mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7347 Property Editor : Enable undo/redo of field changed operations
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
#include "RiuViewer.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafCmdExecCommandManager.h"
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafFixedAtlasFont.h"
|
||||
#include "cafPdmUiModelChangeDetector.h"
|
||||
@@ -944,6 +945,12 @@ RiuPlotMainWindow* RiaGuiApplication::getOrCreateMainPlotWindow()
|
||||
void RiaGuiApplication::createMainWindow()
|
||||
{
|
||||
CVF_ASSERT( m_mainWindow == nullptr );
|
||||
|
||||
if ( RiaPreferences::current()->useUndoRedo() )
|
||||
{
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
}
|
||||
|
||||
m_mainWindow = new RiuMainWindow;
|
||||
QString platform = cvf::System::is64Bit() ? "(64bit)" : "(32bit)";
|
||||
m_mainWindow->setWindowTitle( "ResInsight " + platform );
|
||||
@@ -973,6 +980,11 @@ void RiaGuiApplication::createMainPlotWindow()
|
||||
{
|
||||
CVF_ASSERT( m_mainPlotWindow == nullptr );
|
||||
|
||||
if ( RiaPreferences::current()->useUndoRedo() )
|
||||
{
|
||||
caf::CmdExecCommandManager::instance()->enableUndoCommandSystem( true );
|
||||
}
|
||||
|
||||
m_mainPlotWindow = new RiuPlotMainWindow;
|
||||
m_mainPlotWindow->setWindowTitle( "Plots - ResInsight" );
|
||||
m_mainPlotWindow->setDefaultWindowSize();
|
||||
|
||||
Reference in New Issue
Block a user