mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Added enabled state and button to be able to execute a command object
p4#: 22397
This commit is contained in:
@@ -51,6 +51,7 @@ RimCommandExecuteScript::RimCommandExecuteScript()
|
||||
{
|
||||
CAF_PDM_InitField(&scriptText, "ScriptText", QString(), "ScriptText", "", "" ,"");
|
||||
scriptText.setUiEditorTypeName(caf::PdmUiTextEditor::uiEditorTypeName());
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -93,6 +94,18 @@ void RimCommandExecuteScript::undo()
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCommandExecuteScript::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
|
||||
{
|
||||
caf::PdmUiTextEditorAttribute* myAttr = dynamic_cast<caf::PdmUiTextEditorAttribute*>(attribute);
|
||||
if (myAttr)
|
||||
{
|
||||
myAttr->showSaveButton = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user