From: azv Date: Wed, 13 Dec 2017 10:40:36 +0000 (+0300) Subject: Add names to transactions operating with folders to have named lines in Undo/Redo... X-Git-Tag: V_2.10.0RC~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=047a6c0106078a9953f72510f4e204313f2bcf72;p=modules%2Fshaper.git Add names to transactions operating with folders to have named lines in Undo/Redo lists (issue #2338) --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index bff026792..9d3a7bbea 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2630,7 +2630,9 @@ void XGUI_Workshop::insertFeatureFolder() SessionPtr aMgr = ModelAPI_Session::get(); DocumentPtr aDoc = aMgr->activeDocument(); - aMgr->startOperation(); + QString aDescription = contextMenuMgr()->action("INSERT_FOLDER_CMD")->text(); + + aMgr->startOperation(aDescription.toStdString()); aDoc->addFolder(aFeature); aMgr->finishOperation(); } @@ -2650,7 +2652,10 @@ void XGUI_Workshop::insertToFolder(bool isBefore) if (!aFolder.get()) return; - aMgr->startOperation(); + QString aDescription = contextMenuMgr()->action( + isBefore ? "ADD_TO_FOLDER_BEFORE_CMD" : "ADD_TO_FOLDER_AFTER_CMD")->text(); + + aMgr->startOperation(aDescription.toStdString()); aDoc->moveToFolder(aFeatures, aFolder); aMgr->finishOperation(); } @@ -2664,7 +2669,11 @@ void XGUI_Workshop::moveOutFolder(bool isBefore) SessionPtr aMgr = ModelAPI_Session::get(); DocumentPtr aDoc = aMgr->activeDocument(); - aMgr->startOperation(); + + QString aDescription = contextMenuMgr()->action( + isBefore ? "ADD_OUT_FOLDER_BEFORE_CMD" : "ADD_OUT_FOLDER_AFTER_CMD")->text(); + + aMgr->startOperation(aDescription.toStdString()); aDoc->removeFromFolder(aFeatures, isBefore); aMgr->finishOperation(); }