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