#8827 Avoid UI updates during delete of a sub plot

This commit is contained in:
Magne Sjaastad 2022-04-26 10:19:46 +02:00
parent 0f5d949af0
commit cb8b18222e
2 changed files with 7 additions and 0 deletions

View File

@ -98,6 +98,7 @@ RimSummaryPlot::RimSummaryPlot( bool isCrossPlot )
, m_isCrossPlot( isCrossPlot )
, curvesChanged( this )
, axisChanged( this )
, m_isValid( true )
{
CAF_PDM_InitScriptableObject( "Summary Plot", ":/SummaryPlotLight16x16.png", "", "A Summary Plot" );
@ -192,6 +193,8 @@ RimSummaryPlot::RimSummaryPlot( bool isCrossPlot )
//--------------------------------------------------------------------------------------------------
RimSummaryPlot::~RimSummaryPlot()
{
m_isValid = false;
removeMdiWindowFromMdiArea();
deletePlotCurvesAndPlotWidget();
@ -1567,6 +1570,8 @@ QImage RimSummaryPlot::snapshotWindowContent()
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
{
if ( !m_isValid ) return;
bool isPlotEditor = ( uiConfigName == RicSummaryPlotEditorUi::CONFIGURATION_NAME );
if ( !isPlotEditor ) uiTreeOrdering.add( &m_axisProperties );

View File

@ -327,4 +327,6 @@ private:
std::unique_ptr<RimSummaryPlotNameHelper> m_nameHelperAllCurves;
caf::PdmChildField<RimSummaryPlotSourceStepping*> m_sourceStepping;
bool m_isValid;
};