mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
This commit is contained in:
parent
6a82534ce8
commit
5341581bf6
@ -19,6 +19,7 @@
|
||||
#include "RicCreateSummaryCaseCollectionFeature.h"
|
||||
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCaseMainCollection.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
@ -34,9 +35,16 @@ CAF_CMD_SOURCE_INIT(RicCreateSummaryCaseCollectionFeature, "RicCreateSummaryCase
|
||||
bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimSummaryCase*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&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);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user