mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5775 Add ensemble id to RimSummaryCaseCollection.
This commit is contained in:
committed by
Gaute Lindkvist
parent
bc08aa1905
commit
6dd4dabc33
@@ -69,6 +69,7 @@
|
||||
#include "RimScriptCollection.h"
|
||||
#include "RimSummaryCalculation.h"
|
||||
#include "RimSummaryCalculationCollection.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
#include "RimSummaryCrossPlotCollection.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
@@ -114,6 +115,7 @@ RimProject::RimProject( void )
|
||||
, m_nextValidPlotId( 1 )
|
||||
, m_nextValidCalculationId( 1 )
|
||||
, m_nextValidSummaryCaseId( 1 )
|
||||
, m_nextValidEnsembleId( 1 )
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Project", "", "", "", "Project", "The ResInsight Project" );
|
||||
|
||||
@@ -257,6 +259,7 @@ void RimProject::close()
|
||||
m_nextValidPlotId = 1;
|
||||
m_nextValidCalculationId = 1;
|
||||
m_nextValidSummaryCaseId = 1;
|
||||
m_nextValidEnsembleId = 1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -504,6 +507,23 @@ void RimProject::assignCaseIdToSummaryCase( RimSummaryCase* summaryCase )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::assignIdToEnsemble( RimSummaryCaseCollection* summaryCaseCollection )
|
||||
{
|
||||
if ( summaryCaseCollection )
|
||||
{
|
||||
std::vector<RimSummaryCaseCollection*> summaryGroups = RimProject::summaryGroups();
|
||||
for ( RimSummaryCaseCollection* s : summaryGroups )
|
||||
{
|
||||
m_nextValidEnsembleId = std::max( m_nextValidEnsembleId, s->ensembleId() + 1 );
|
||||
}
|
||||
|
||||
summaryCaseCollection->setEnsembleId( m_nextValidEnsembleId );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user