#5171 Fix legend updates by getting rid of the show/hideEvent crash fix

* The crash is instead fixed by getting rid of deleteLater()
This commit is contained in:
Gaute Lindkvist
2019-12-04 09:13:54 +01:00
parent b5712987de
commit cd5b432267
10 changed files with 46 additions and 27 deletions

View File

@@ -118,7 +118,9 @@ RimFlowCharacteristicsPlot::~RimFlowCharacteristicsPlot()
if ( m_flowCharPlotWidget )
{
m_flowCharPlotWidget->deleteLater();
m_flowCharPlotWidget->hide();
m_flowCharPlotWidget->setParent( nullptr );
delete m_flowCharPlotWidget;
m_flowCharPlotWidget = nullptr;
}
}
@@ -167,7 +169,9 @@ void RimFlowCharacteristicsPlot::deleteViewWidget()
{
if ( m_flowCharPlotWidget )
{
m_flowCharPlotWidget->deleteLater();
m_flowCharPlotWidget->hide();
m_flowCharPlotWidget->setParent( nullptr );
delete m_flowCharPlotWidget;
m_flowCharPlotWidget = nullptr;
}
}

View File

@@ -71,7 +71,9 @@ RimTofAccumulatedPhaseFractionsPlot::~RimTofAccumulatedPhaseFractionsPlot()
if ( m_tofAccumulatedPhaseFractionsPlotWidget )
{
m_tofAccumulatedPhaseFractionsPlotWidget->deleteLater();
m_tofAccumulatedPhaseFractionsPlotWidget->hide();
m_tofAccumulatedPhaseFractionsPlotWidget->setParent( nullptr );
delete m_tofAccumulatedPhaseFractionsPlotWidget;
m_tofAccumulatedPhaseFractionsPlotWidget = nullptr;
}
}
@@ -91,7 +93,9 @@ void RimTofAccumulatedPhaseFractionsPlot::deleteViewWidget()
{
if ( m_tofAccumulatedPhaseFractionsPlotWidget )
{
m_tofAccumulatedPhaseFractionsPlotWidget->deleteLater();
m_tofAccumulatedPhaseFractionsPlotWidget->hide();
m_tofAccumulatedPhaseFractionsPlotWidget->setParent( nullptr );
delete m_tofAccumulatedPhaseFractionsPlotWidget;
m_tofAccumulatedPhaseFractionsPlotWidget = nullptr;
}
}

View File

@@ -59,7 +59,9 @@ RimTotalWellAllocationPlot::~RimTotalWellAllocationPlot()
if ( m_wellTotalAllocationPlotWidget )
{
m_wellTotalAllocationPlotWidget->deleteLater();
m_wellTotalAllocationPlotWidget->hide();
m_wellTotalAllocationPlotWidget->setParent( nullptr );
delete m_wellTotalAllocationPlotWidget;
m_wellTotalAllocationPlotWidget = nullptr;
}
}
@@ -79,7 +81,9 @@ void RimTotalWellAllocationPlot::deleteViewWidget()
{
if ( m_wellTotalAllocationPlotWidget )
{
m_wellTotalAllocationPlotWidget->deleteLater();
m_wellTotalAllocationPlotWidget->hide();
m_wellTotalAllocationPlotWidget->setParent( nullptr );
delete m_wellTotalAllocationPlotWidget;
m_wellTotalAllocationPlotWidget = nullptr;
}
}

View File

@@ -146,7 +146,9 @@ RimWellAllocationPlot::~RimWellAllocationPlot()
if ( m_wellAllocationPlotWidget )
{
m_wellAllocationPlotWidget->deleteLater();
m_wellAllocationPlotWidget->hide();
m_wellAllocationPlotWidget->setParent( nullptr );
delete m_wellAllocationPlotWidget;
m_wellAllocationPlotWidget = nullptr;
}
}
@@ -192,7 +194,9 @@ void RimWellAllocationPlot::deleteViewWidget()
{
if ( m_wellAllocationPlotWidget )
{
m_wellAllocationPlotWidget->deleteLater();
m_wellAllocationPlotWidget->hide();
m_wellAllocationPlotWidget->setParent( nullptr );
delete m_wellAllocationPlotWidget;
m_wellAllocationPlotWidget = nullptr;
}
}