From e7f2142f05e88ee31465220cb36e717dae28af43 Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 4 Apr 2016 11:06:32 +0300 Subject: [PATCH] Issue #1343. Improvement of Extrusion and Revolution operations: Bug correction: Clean History on Extrusion. --- src/XGUI/XGUI_Workshop.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 455bebcd6..8290f2c72 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1202,6 +1202,7 @@ void XGUI_Workshop::deleteObjects() ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module()); operationMgr()->startOperation(anOpAction); + // WORKAROUND, should be done before each object remove, if it presents in XGUI_DataModel tree // It is necessary to clear selection in order to avoid selection changed event during // deletion and negative consequences connected with processing of already deleted items mySelector->clearSelection(); @@ -1296,6 +1297,11 @@ void XGUI_Workshop::cleanHistory() ModuleBase_OperationAction* anOpAction = new ModuleBase_OperationAction(aDescription, module()); operationMgr()->startOperation(anOpAction); + // WORKAROUND, should be done before each object remove, if it presents in XGUI_DataModel tree + // It is necessary to clear selection in order to avoid selection changed event during + // deletion and negative consequences connected with processing of already deleted items + mySelector->clearSelection(); + std::set anIgnoredFeatures; if (removeFeatures(anUnusedObjects, anIgnoredFeatures, anActionId)) { operationMgr()->commitOperation(); -- 2.39.2