mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 09:22:13 -05:00
PlotCurve : Remove duplicate code
This commit is contained in:
1 parent
ae3cc0010d
commit
f1fbe4d8ac
1 file changed
+7
-19
@@ -550,7 +550,7 @@ void RimPlotCurve::showLegend(bool show)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::setZOrder(double z)
|
||||
{
|
||||
@@ -561,24 +561,11 @@ void RimPlotCurve::setZOrder(double z)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
|
||||
{
|
||||
if (m_showLegend()) {
|
||||
if (m_curveName().isEmpty())
|
||||
{
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||
}
|
||||
updateLegendEntryVisibilityNoPlotUpdate();
|
||||
|
||||
if (m_parentQwtPlot != nullptr)
|
||||
{
|
||||
@@ -587,11 +574,12 @@ void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
||||
{
|
||||
if (m_showLegend()) {
|
||||
if (m_showLegend())
|
||||
{
|
||||
if (m_curveName().isEmpty())
|
||||
{
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||
@@ -605,4 +593,4 @@ void RimPlotCurve::updateLegendEntryVisibilityNoPlotUpdate()
|
||||
{
|
||||
m_qwtPlotCurve->setItemAttribute(QwtPlotItem::Legend, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user