From bd6a919192b53de5e543a60d889e266ea15680d3 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 24 Jan 2024 14:54:43 +0100 Subject: [PATCH] Cleanup --- ApplicationLibCode/Application/Tools/RiaSummaryTools.cpp | 9 ++++----- ApplicationLibCode/Application/Tools/RiaSummaryTools.h | 6 ++++-- .../Summary/RimSummaryCaseMainCollection.cpp | 8 -------- .../Summary/RimSummaryCaseMainCollection.h | 1 - 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/ApplicationLibCode/Application/Tools/RiaSummaryTools.cpp b/ApplicationLibCode/Application/Tools/RiaSummaryTools.cpp index 82ad4c064c..8d6c10ab75 100644 --- a/ApplicationLibCode/Application/Tools/RiaSummaryTools.cpp +++ b/ApplicationLibCode/Application/Tools/RiaSummaryTools.cpp @@ -332,13 +332,13 @@ void RiaSummaryTools::copyCurveAxisData( RimSummaryCurve& curve, const RimSummar //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RiaSummaryTools::updateRequredCalculatedCurves( RimSummaryCase* sourceSummaryCase ) +void RiaSummaryTools::updateRequiredCalculatedCurves( RimSummaryCase* sourceSummaryCase ) { RimSummaryCalculationCollection* calcColl = RimProject::current()->calculationCollection(); for ( RimUserDefinedCalculation* summaryCalculation : calcColl->calculations() ) { - bool needsUpdate = RiaSummaryTools::checkIfCalculationNeedsUpdate( summaryCalculation, sourceSummaryCase ); + bool needsUpdate = RiaSummaryTools::isCalculationRequired( summaryCalculation, sourceSummaryCase ); if ( needsUpdate ) { summaryCalculation->parseExpression(); @@ -351,7 +351,7 @@ void RiaSummaryTools::updateRequredCalculatedCurves( RimSummaryCase* sourceSumma //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RiaSummaryTools::checkIfCalculationNeedsUpdate( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase ) +bool RiaSummaryTools::isCalculationRequired( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase ) { std::vector variables = summaryCalculation->allVariables(); for ( RimUserDefinedCalculationVariable* variable : variables ) @@ -374,12 +374,11 @@ void RiaSummaryTools::reloadSummaryCase( RimSummaryCase* summaryCase ) if ( !summaryCase ) return; summaryCase->updateAutoShortName(); - summaryCase->createSummaryReaderInterface(); summaryCase->createRftReaderInterface(); summaryCase->refreshMetaData(); - RiaSummaryTools::updateRequredCalculatedCurves( summaryCase ); + RiaSummaryTools::updateRequiredCalculatedCurves( summaryCase ); RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection(); for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() ) diff --git a/ApplicationLibCode/Application/Tools/RiaSummaryTools.h b/ApplicationLibCode/Application/Tools/RiaSummaryTools.h index 1941c66836..e293625716 100644 --- a/ApplicationLibCode/Application/Tools/RiaSummaryTools.h +++ b/ApplicationLibCode/Application/Tools/RiaSummaryTools.h @@ -86,7 +86,9 @@ class RiaSummaryTools static void copyCurveDataSources( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve ); static void copyCurveAxisData( RimSummaryCurve& curve, const RimSummaryCurve& otherCurve ); - static void updateRequredCalculatedCurves( RimSummaryCase* sourceSummaryCase ); - static bool checkIfCalculationNeedsUpdate( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase ); static void reloadSummaryCase( RimSummaryCase* summaryCase ); + +private: + static void updateRequiredCalculatedCurves( RimSummaryCase* sourceSummaryCase ); + static bool isCalculationRequired( const RimUserDefinedCalculation* summaryCalculation, const RimSummaryCase* summaryCase ); }; diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp index f03cad6980..95909fc253 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryCaseMainCollection.cpp @@ -403,14 +403,6 @@ void RimSummaryCaseMainCollection::loadSummaryCaseData( std::vector