Salome HOME
Fix for the issue #686: now compounds produced by the Boolean operations can be corre...
[modules/shaper.git] / src / PartSet / PartSet_MenuMgr.cpp
index 744b9b4f0c6d3ba1c155d2bddf926eeadff8c261..3163169774391d660c1eca14389ec851d2c37f9b 100644 (file)
@@ -488,7 +488,15 @@ void PartSet_MenuMgr::onActivatePart(bool)
 void PartSet_MenuMgr::onActivatePartSet(bool)
 {
   SessionPtr aMgr = ModelAPI_Session::get();
+  bool isNewTransaction = !aMgr->isOperation();
+  // activation may cause changes in current features in document, so it must be in transaction
+  if (isNewTransaction) {
+    aMgr->startOperation("Activation");
+  }
   aMgr->setActiveDocument(aMgr->moduleDocument());
+  if (isNewTransaction) {
+    aMgr->finishOperation();
+  }
 }
 
 void PartSet_MenuMgr::onEdit(bool)