mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
#3112 Derived ensembles. Show only one delete item in context menu
This commit is contained in:
1 parent
8e53e2a3cf
commit
533b000184
3 files changed
+14
No files matched your search
@@ -21,6 +21,8 @@
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RimDerivedEnsembleCaseCollection.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
@@ -65,6 +67,10 @@ bool RicDeleteSummaryCaseCollectionFeature::isCommandEnabled()
|
||||
std::vector<RimSummaryCaseCollection*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
|
||||
selection.erase(std::remove_if(selection.begin(), selection.end(), [](RimSummaryCaseCollection* coll)
|
||||
{
|
||||
return dynamic_cast<RimDerivedEnsembleCaseCollection*>(coll) != nullptr;
|
||||
}), selection.end());
|
||||
return (selection.size() > 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user