X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_MenuMgr.cpp;h=3163169774391d660c1eca14389ec851d2c37f9b;hb=1b6e16d96b4f83c138791e0e86842d1507bcef1f;hp=744b9b4f0c6d3ba1c155d2bddf926eeadff8c261;hpb=89aeee12f9f793e37165457ae46edbbf6aec1a26;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_MenuMgr.cpp b/src/PartSet/PartSet_MenuMgr.cpp index 744b9b4f0..316316977 100644 --- a/src/PartSet/PartSet_MenuMgr.cpp +++ b/src/PartSet/PartSet_MenuMgr.cpp @@ -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)