#1751 #1840 Summary case: Remove option to group cases within another case

This commit is contained in:
Rebecca Cox 2017-09-07 14:54:22 +02:00
parent 6a82534ce8
commit 5341581bf6

View File

@ -19,6 +19,7 @@
#include "RicCreateSummaryCaseCollectionFeature.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "cafPdmObject.h"
@ -36,7 +37,14 @@ bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled()
std::vector<RimSummaryCase*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
return (selection.size() > 0);
RimSummaryCaseCollection* summaryCaseCollection = nullptr;
if (selection.size() > 0)
{
selection[0]->firstAncestorOrThisOfType(summaryCaseCollection);
}
return (selection.size() > 0 && !summaryCaseCollection);
}
//--------------------------------------------------------------------------------------------------