mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5775 Add case id to summary case.
This commit is contained in:
committed by
Gaute Lindkvist
parent
0a33cc269a
commit
bc08aa1905
@@ -113,6 +113,7 @@ RimProject::RimProject( void )
|
||||
, m_nextValidViewId( 1 )
|
||||
, m_nextValidPlotId( 1 )
|
||||
, m_nextValidCalculationId( 1 )
|
||||
, m_nextValidSummaryCaseId( 1 )
|
||||
{
|
||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Project", "", "", "", "Project", "The ResInsight Project" );
|
||||
|
||||
@@ -255,6 +256,7 @@ void RimProject::close()
|
||||
m_nextValidViewId = 1;
|
||||
m_nextValidPlotId = 1;
|
||||
m_nextValidCalculationId = 1;
|
||||
m_nextValidSummaryCaseId = 1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -485,6 +487,23 @@ void RimProject::setProjectFileNameAndUpdateDependencies( const QString& project
|
||||
wellPathImport->updateFilePaths();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::assignCaseIdToSummaryCase( RimSummaryCase* summaryCase )
|
||||
{
|
||||
if ( summaryCase )
|
||||
{
|
||||
std::vector<RimSummaryCase*> summaryCases = allSummaryCases();
|
||||
for ( RimSummaryCase* s : summaryCases )
|
||||
{
|
||||
m_nextValidSummaryCaseId = std::max( m_nextValidSummaryCaseId, s->caseId() + 1 );
|
||||
}
|
||||
|
||||
summaryCase->setCaseId( m_nextValidSummaryCaseId++ );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user