From 7696912cfec03820b2728bc7315fcc41467a1813 Mon Sep 17 00:00:00 2001 From: vsv Date: Mon, 30 Sep 2019 15:14:05 +0300 Subject: [PATCH] Issue #3022: Update list of Undo commands --- src/XGUI/XGUI_Workshop.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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(); } //************************************************************** -- 2.39.2