From: vsv Date: Mon, 30 Sep 2019 12:14:05 +0000 (+0300) Subject: Issue #3022: Update list of Undo commands X-Git-Tag: V9_4_0a2~4^2~55 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7696912cfec03820b2728bc7315fcc41467a1813;p=modules%2Fshaper.git Issue #3022: Update list of Undo commands --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 2ab27551e..f46604782 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2043,10 +2043,6 @@ void XGUI_Workshop::moveObjects() SessionPtr aMgr = ModelAPI_Session::get(); - QString anActionId = "MOVE_CMD"; - QString aDescription = contextMenuMgr()->action(anActionId)->text(); - aMgr->startOperation(aDescription.toStdString()); - QObjectPtrList anObjects = mySelector->selection()->selectedObjects(); // It is necessary to clear selection in order to avoid selection changed event during // moving and negative consequences connected with processing of already moved items @@ -2057,6 +2053,10 @@ void XGUI_Workshop::moveObjects() if (!XGUI_Tools::canRemoveOrRename(desktop(), aFeatures)) return; + QString anActionId = "MOVE_CMD"; + QString aDescription = contextMenuMgr()->action(anActionId)->text(); + aMgr->startOperation(aDescription.toStdString()); + // Sort features by index in document std::list aFList(aFeatures.begin(), aFeatures.end()); aFList.sort(compareFeature); @@ -2073,6 +2073,7 @@ void XGUI_Workshop::moveObjects() aCurrentFeature = anActiveDocument->currentFeature(true); } aMgr->finishOperation(); + updateCommandStatus(); } //**************************************************************