X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_MenuMgr.cpp;h=b9c7e78c8151f7461fe2d508e4a4d1132de46d82;hb=refs%2Fheads%2FV9_11_BR;hp=ce5f478a3d2568c9c1c740897ec72f592193c65e;hpb=1fd15bed1c62f994a3438bc4a12f44d0361f98c9;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_MenuMgr.cpp b/src/PartSet/PartSet_MenuMgr.cpp index ce5f478a3..b9c7e78c8 100644 --- a/src/PartSet/PartSet_MenuMgr.cpp +++ b/src/PartSet/PartSet_MenuMgr.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2021 CEA/DEN, EDF R&D +// Copyright (C) 2014-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -495,15 +496,20 @@ void PartSet_MenuMgr::onActivatePart(bool) void PartSet_MenuMgr::activatePart(ResultPartPtr thePart) const { bool isFirstLoad = !thePart->partDoc().get(); + ModuleBase_Tools::blockUpdateViewer(true); thePart->activate(); if (isFirstLoad) { XGUI_Workshop* aWorkshop = myModule->getWorkshop(); XGUI_ObjectsBrowser* aObjBrowser = aWorkshop->objectBrowser(); + ModuleBase_Tools::setDisplaying(thePart); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); + aObjBrowser->onSelectionChanged(); DocumentPtr aDoc = thePart->partDoc(); std::list aStates; aDoc->restoreNodesState(aStates); aObjBrowser->setStateForDoc(aDoc, aStates); } + ModuleBase_Tools::blockUpdateViewer(false); } void PartSet_MenuMgr::onActivateAllParts()