mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
AppFwk : Added CmdExecCommandSystemActivator
This commit is contained in:
parent
331456e619
commit
58caac451c
@ -78,6 +78,7 @@ private:
|
||||
|
||||
bool isUndoEnabledForCurrentCommand(CmdExecuteCommand* command);
|
||||
|
||||
friend class CmdExecCommandSystemActivator;
|
||||
friend class CmdExecCommandSystemDeactivator;
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user