#3337 Make sure well log plots maintain legend order if you hide and show items.

This commit is contained in:
Gaute Lindkvist
2018-09-07 13:39:50 +02:00
parent bdcdf49269
commit 612409ac59
8 changed files with 83 additions and 16 deletions

View File

@@ -323,6 +323,18 @@ void RimPlotCurve::detachQwtCurve()
m_qwtPlotCurve->detach();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::reattachQwtCurve()
{
detachQwtCurve();
if (m_parentQwtPlot && m_showCurve)
{
m_qwtPlotCurve->attach(m_parentQwtPlot);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -405,6 +417,17 @@ void RimPlotCurve::updatePlotTitle()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::updateLegendsInPlot()
{
if (m_parentQwtPlot != nullptr)
{
m_parentQwtPlot->updateLegend();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -641,11 +664,7 @@ void RimPlotCurve::setZOrder(double z)
void RimPlotCurve::updateLegendEntryVisibilityAndPlotLegend()
{
updateLegendEntryVisibilityNoPlotUpdate();
if (m_parentQwtPlot != nullptr)
{
m_parentQwtPlot->updateLegend();
}
updateLegendsInPlot();
}
//--------------------------------------------------------------------------------------------------