mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
(#339) Added "New Grid Case Group" to the context menu of "Grid Models"
This commit is contained in:
parent
fb6baee197
commit
c5606a46aa
@ -22,6 +22,7 @@
|
||||
#include "RicEclipseCaseNewGroupExec.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
@ -35,17 +36,13 @@ CAF_CMD_SOURCE_INIT(RicEclipseCaseNewGroupFeature, "RicEclipseCaseNewGroupFeatur
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEclipseCaseNewGroupFeature::isCommandEnabled()
|
||||
{
|
||||
std::vector<RimCase*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
std::vector<RimCase*> caseSelection;
|
||||
caf::SelectionManager::instance()->objectsByType(&caseSelection);
|
||||
|
||||
if (selection.size() > 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
std::vector<RimEclipseCaseCollection*> caseCollSelection;
|
||||
caf::SelectionManager::instance()->objectsByType(&caseCollSelection);
|
||||
|
||||
return caseSelection.size() > 0 || caseCollSelection.size() > 0;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -563,6 +563,7 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
|
||||
commandIds << "RicImportEclipseCaseFeature";
|
||||
commandIds << "RicImportInputEclipseCaseFeature";
|
||||
commandIds << "RicCreateGridCaseGroupFeature";
|
||||
commandIds << "RicEclipseCaseNewGroupFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimGeoMechView*>(uiItem))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user