#5388 Make sure plots aren't unchecked if the parent is unchecked

This commit is contained in:
Gaute Lindkvist 2020-01-24 15:35:17 +01:00
parent e4ffa5d7b9
commit 98dfa8a72b

View File

@ -216,9 +216,17 @@ void RimPlot::onCurveSelected( QwtPlotCurve* curve, bool toggle )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimPlot::onViewerDestroyed() void RimPlot::onViewerDestroyed()
{ {
RimPlotWindow* parent = nullptr;
this->firstAncestorOfType( parent );
bool isIndependentPlot = parent == nullptr;
bool hasVisibleParent = parent && parent->showWindow();
if ( isIndependentPlot || hasVisibleParent )
{
m_showWindow = false; m_showWindow = false;
updateConnectedEditors(); updateConnectedEditors();
updateUiIconFromToggleField(); updateUiIconFromToggleField();
}
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------