From 064c0adb8c2c34cda803fa003f6cfc84721ceaa9 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 13 Mar 2023 19:33:36 +0100 Subject: [PATCH] #9956 Summary Plot: Fix update of operations on multiple ensembles When multiple ensemble curve sets are toggled on/off, it is required to do a full RimSummaryPlot::loadDataAndUpdate() that will call RimEnsembleCurveSet::updateCurves() on all ensembles in the plot. This can be a heavy operation, but will happen only once. --- .../ProjectDataModel/Summary/RimEnsembleCurveSet.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp index dc994bfd31..d860e4df53 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimEnsembleCurveSet.cpp @@ -633,10 +633,13 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi if ( changedField == &m_showCurves ) { - loadDataAndUpdate( true ); - updateConnectedEditors(); + // When multiple ensemble curve sets are toggled on/off, it is required to do a full RimSummaryPlot::loadDataAndUpdate() that will + // call RimEnsembleCurveSet::updateCurves() on all ensembles in the plot. This can be a heavy operation, but will happen only once. + // https://github.com/OPM/ResInsight/issues/9956 + plot->loadDataAndUpdate(); + updateTextInPlot = true; } else if ( changedField == &m_yValuesSummaryAddressUiField )