mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3337 Make sure well log plots maintain legend order if you hide and show items.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user