mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Speed up summary case close/delete for ensembles (#8907)
* Speed up summary case close/delete for ensembles
This commit is contained in:
@@ -243,7 +243,7 @@ void RimSummaryCaseMainCollection::addCase( RimSummaryCase* summaryCase )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase )
|
||||
void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase, bool notifyChange )
|
||||
{
|
||||
std::vector<RimDerivedEnsembleCaseCollection*> derivedEnsembles;
|
||||
|
||||
@@ -264,7 +264,7 @@ void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase )
|
||||
|
||||
for ( RimSummaryCaseCollection* summaryCaseCollection : m_caseCollections )
|
||||
{
|
||||
summaryCaseCollection->removeCase( summaryCase );
|
||||
summaryCaseCollection->removeCase( summaryCase, notifyChange );
|
||||
}
|
||||
|
||||
// Update derived ensemble cases (if any)
|
||||
@@ -273,6 +273,24 @@ void RimSummaryCaseMainCollection::removeCase( RimSummaryCase* summaryCase )
|
||||
derEnsemble->createDerivedEnsembleCases();
|
||||
}
|
||||
|
||||
if ( notifyChange ) dataSourceHasChanged.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCaseMainCollection::removeCases( std::vector<RimSummaryCase*>& cases )
|
||||
{
|
||||
for ( auto sumCase : cases )
|
||||
{
|
||||
removeCase( sumCase, false );
|
||||
}
|
||||
|
||||
for ( RimSummaryCaseCollection* summaryCaseCollection : m_caseCollections )
|
||||
{
|
||||
summaryCaseCollection->updateReferringCurveSets();
|
||||
}
|
||||
|
||||
dataSourceHasChanged.send();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user