mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3112 Derived ensembles. Show only one delete item in context menu
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "RicCloseSummaryCaseFeature.h"
|
||||
|
||||
#include "RimDerivedEnsembleCaseCollection.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
@@ -62,6 +63,11 @@ bool RicCloseSummaryCaseInCollectionFeature::isCommandEnabled()
|
||||
std::vector<RimSummaryCaseCollection*> summaryCaseCollections;
|
||||
caf::SelectionManager::instance()->objectsByType(&summaryCaseCollections);
|
||||
|
||||
summaryCaseCollections.erase(std::remove_if(summaryCaseCollections.begin(), summaryCaseCollections.end(), [](RimSummaryCaseCollection* coll)
|
||||
{
|
||||
return dynamic_cast<RimDerivedEnsembleCaseCollection*>(coll) != nullptr;
|
||||
}), summaryCaseCollections.end());
|
||||
|
||||
return (summaryCaseMainCollections.size() > 0 || summaryCaseCollections.size() > 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user