diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp index 6f60b7fac3..8f3c30ff21 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp @@ -77,7 +77,9 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked) { defaultCase = project->activeOilField()->summaryCaseCollection()->summaryCase(0); newCurve->setSummaryCase(defaultCase); - newCurve->setVariable("FOPT"); + + newCurve->setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress("FOPT")); + newCurve->loadDataAndUpdate(); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index ebdcdf7494..8bf0f03b8d 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -207,14 +207,6 @@ RimSummaryCase* RimSummaryCurve::summaryCase() return m_summaryCase(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -void RimSummaryCurve::setVariable(QString varName) -{ - setSummaryAddress(RifEclipseSummaryAddress::fieldVarAddress(varName.toStdString())); -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h index a670ea1826..083695114a 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.h @@ -79,7 +79,6 @@ public: void setSummaryCase(RimSummaryCase* sumCase); RimSummaryCase* summaryCase(); - void setVariable(QString varName); RifEclipseSummaryAddress summaryAddress(); void setSummaryAddress(const RifEclipseSummaryAddress& address);