mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#743) Hide "Add Input Property"
This commit is contained in:
parent
830db2c6ec
commit
6a4ef00c41
@ -21,6 +21,7 @@
|
||||
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
#include "RimEclipseInputCase.h"
|
||||
#include "RimEclipseInputCaseOpm.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiuMainWindow.h"
|
||||
@ -39,6 +40,18 @@ CAF_CMD_SOURCE_INIT(RicAddEclipseInputPropertyFeature, "RicAddEclipseInputProper
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicAddEclipseInputPropertyFeature::isCommandEnabled()
|
||||
{
|
||||
RimEclipseInputPropertyCollection* inputProp = selectedInputPropertyCollection();
|
||||
if (inputProp)
|
||||
{
|
||||
RimEclipseInputCaseOpm* inputCaseOpm = NULL;
|
||||
|
||||
inputProp->firstAnchestorOrThisOfType(inputCaseOpm);
|
||||
if (inputCaseOpm)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return selectedInputPropertyCollection() != NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user