mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8453 Fix crash when changing plot type (QtCharts <-> Qwt).
This commit is contained in:
@@ -1525,6 +1525,29 @@ void RimSummaryPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef USE_QTCHARTS
|
||||
if ( changedField == &m_useQtChartsPlot )
|
||||
{
|
||||
// Hide window
|
||||
setShowWindow( false );
|
||||
|
||||
// Detach and destroy plot curves
|
||||
for ( auto c : summaryCurves() )
|
||||
{
|
||||
c->detach( true );
|
||||
}
|
||||
|
||||
for ( auto& curveSet : this->ensembleCurveSetCollection()->curveSets() )
|
||||
{
|
||||
curveSet->detachPlotCurves( true );
|
||||
}
|
||||
|
||||
// Destroy viewer
|
||||
removeMdiWindowFromMdiArea();
|
||||
cleanupBeforeClose();
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( changedField == &m_normalizeCurveYValues )
|
||||
{
|
||||
this->loadDataAndUpdate();
|
||||
|
||||
Reference in New Issue
Block a user