From: nds Date: Tue, 9 Dec 2014 09:23:07 +0000 (+0300) Subject: Issue #121 - Copy, Paste, Duplicate Part, Remove Part, Edit – Undo, Redo are enabled... X-Git-Tag: before_slalome_7.5.1~29^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d69a7240711c86f39446238c3219164b07667c49;p=modules%2Fshaper.git Issue #121 - Copy, Paste, Duplicate Part, Remove Part, Edit – Undo, Redo are enabled in a new study It removes actions Copy/Paste and update the initial enabled state of Undo/Redo actions. --- diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 5755c626f..baeee345d 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -147,9 +147,13 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) myIsOpened = false; QTimer::singleShot(1000, myWorkshop, SLOT(displayAllResults())); } + else + myWorkshop->updateCommandStatus(); } SUIT_ResourceMgr* aResMgr = application()->resourceMgr(); myIsStorePositions = aResMgr->booleanValue("Study", "store_positions", true); + myIsEditEnabled = getApp()->isEditEnabled(); + getApp()->setEditEnabled(false); // this following row is caused by #187 bug. // SALOME saves the dock widget positions before deactivateModule() and @@ -197,6 +201,7 @@ bool NewGeom_Module::deactivateModule(SUIT_Study* theStudy) SUIT_ResourceMgr* aResMgr = application()->resourceMgr(); aResMgr->setValue("Study", "store_positions", myIsStorePositions); + getApp()->setEditEnabled(myIsEditEnabled); return LightApp_Module::deactivateModule(theStudy); } diff --git a/src/NewGeom/NewGeom_Module.h b/src/NewGeom/NewGeom_Module.h index f8fdfb8f9..24f2f7a39 100644 --- a/src/NewGeom/NewGeom_Module.h +++ b/src/NewGeom/NewGeom_Module.h @@ -117,7 +117,9 @@ Q_OBJECT QMap myDocumentType; bool myIsOpened; - bool myIsStorePositions; + // the next parameters should be restored after this module deactivation + bool myIsStorePositions; // the application value of the preferences parameter + bool myIsEditEnabled; // the application value QtxPopupMgr* myPopupMgr; };