#7438 Project File: Simulation name is hard coded in plots

This commit is contained in:
Magne Sjaastad 2021-06-10 15:44:00 +02:00
parent 5d701dd12a
commit 2e5953216f
3 changed files with 19 additions and 0 deletions

View File

@ -645,6 +645,7 @@ bool RiaApplication::loadProject( const QString& projectFileName,
auto sumMainCollection = oilField->summaryCaseMainCollection();
if ( !sumMainCollection ) continue;
sumMainCollection->updateAutoShortName();
for ( auto sumCaseGroup : sumMainCollection->summaryCaseCollections() )
{
sumCaseGroup->loadDataAndUpdate();

View File

@ -723,3 +723,19 @@ void RimSummaryCaseMainCollection::updateFilePathsFromProjectPath( const QString
summaryCase->updateFilePathsFromProjectPath( newProjectPath, oldProjectPath );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCaseMainCollection::updateAutoShortName()
{
// This update is required if the file path for the summary case is updated. To be able to produce plots
// automatically, the short name must be generated on load
//
// https://github.com/OPM/ResInsight/issues/7438
for ( auto s : allSummaryCases() )
{
s->updateAutoShortName();
}
}

View File

@ -72,6 +72,8 @@ public:
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
void updateAutoShortName();
private:
static void loadSummaryCaseData( std::vector<RimSummaryCase*> summaryCases );
static void loadFileSummaryCaseData( std::vector<RimFileSummaryCase*> fileSummaryCases );