#6367 Improve the way we automatically name ensembles and cases

This commit is contained in:
Gaute Lindkvist
2020-09-02 15:04:48 +02:00
parent f38d119cc8
commit 7cf24d02ff
17 changed files with 416 additions and 110 deletions

View File

@@ -187,6 +187,7 @@ QString EnsembleParameter::uiName() const
///
//--------------------------------------------------------------------------------------------------
RimSummaryCaseCollection::RimSummaryCaseCollection()
: caseNameChanged( this )
{
CAF_PDM_InitScriptableObject( "Summary Case Group", ":/SummaryGroup16x16.png", "", "" );
@@ -227,6 +228,8 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection()
void RimSummaryCaseCollection::removeCase( RimSummaryCase* summaryCase )
{
size_t caseCountBeforeRemove = m_cases.size();
summaryCase->nameChanged.disconnect( this );
m_cases.removeChildObject( summaryCase );
m_cachedSortedEnsembleParameters.clear();
@@ -245,6 +248,8 @@ void RimSummaryCaseCollection::removeCase( RimSummaryCase* summaryCase )
//--------------------------------------------------------------------------------------------------
void RimSummaryCaseCollection::addCase( RimSummaryCase* summaryCase, bool updateCurveSets )
{
summaryCase->nameChanged.connect( this, &RimSummaryCaseCollection::onCaseNameChanged );
m_cases.push_back( summaryCase );
m_cachedSortedEnsembleParameters.clear();
@@ -982,6 +987,14 @@ void RimSummaryCaseCollection::fieldChangedByUi( const caf::PdmFieldHandle* chan
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryCaseCollection::onCaseNameChanged( const SignalEmitter* emitter )
{
caseNameChanged.send();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------