#9915 Fix crash when using Plot Editor

This commit is contained in:
Magne Sjaastad 2023-03-06 10:26:22 +01:00
parent 6b83662e9f
commit a8e131647f

View File

@ -502,7 +502,10 @@ void RicSummaryPlotEditorUi::updatePreviewCurvesFromCurveDefinitions( const std:
curveSet = new RimEnsembleCurveSet();
curveSet->disableStatisticCurves();
curveSet->setSummaryCaseCollection( curveDef.ensemble() );
curveSet->setSummaryAddressAndStatisticsFlag( curveDef.summaryAddress() );
// Do not call setSummaryAddressAndStatisticsFlag() here, as the call to m_statistics->updateAllRequiredEditors(); causes a
// crash in updateUiOrdering. The statistics curves will be created when the curve set is added to the plot.
curveSet->setSummaryAddress( curveDef.summaryAddress() );
// Set single curve set color
auto allCurveSets = m_previewPlot->ensembleCurveSetCollection()->curveSets();