mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk : Added CmdExecCommandSystemActivator
This commit is contained in:
parent
331456e619
commit
58caac451c
@ -78,6 +78,7 @@ private:
|
|||||||
|
|
||||||
bool isUndoEnabledForCurrentCommand(CmdExecuteCommand* command);
|
bool isUndoEnabledForCurrentCommand(CmdExecuteCommand* command);
|
||||||
|
|
||||||
|
friend class CmdExecCommandSystemActivator;
|
||||||
friend class CmdExecCommandSystemDeactivator;
|
friend class CmdExecCommandSystemDeactivator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -103,5 +104,21 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
/// Helper class used to temporarily enable the command system including undo/redo functionality
|
||||||
|
//==================================================================================================
|
||||||
|
class CmdExecCommandSystemActivator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CmdExecCommandSystemActivator()
|
||||||
|
{
|
||||||
|
CmdExecCommandManager::instance()->activateCommandSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
~CmdExecCommandSystemActivator()
|
||||||
|
{
|
||||||
|
CmdExecCommandManager::instance()->deactivateCommandSystem();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // end namespace caf
|
} // end namespace caf
|
||||||
|
Loading…
Reference in New Issue
Block a user