From: vsv Date: Mon, 25 May 2015 15:00:12 +0000 (+0300) Subject: Issue #554: Clear visualization of objects if viewer had been deleted X-Git-Tag: V_1.2.0~93 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=18de45c0c12a940791137b89737dbab034784244;p=modules%2Fshaper.git Issue #554: Clear visualization of objects if viewer had been deleted --- diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 88d61de5b..6ccc5b4bb 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -205,9 +205,11 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) } } if (!aFound) { - aDisp->erase(aObj, false); + aObj->setDisplayed(false); + //aDisp->erase(aObj, false); } } + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); } return isDone; @@ -269,7 +271,11 @@ void NewGeom_Module::onViewManagerRemoved(SUIT_ViewManager* theMgr) if (theMgr->getType() == OCCViewer_Viewer::Type()) { OCCViewer_Viewer* aViewer = static_cast(theMgr->getViewModel()); if (mySelector->viewer() == aViewer) { - myWorkshop->displayer()->eraseAll(false); + XGUI_Displayer* aDisp = myWorkshop->displayer(); + QObjectPtrList aObjects = aDisp->displayedObjects(); + foreach(ObjectPtr aObj, aObjects) + aObj->setDisplayed(false); + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); myProxyViewer->setSelector(0); delete mySelector; mySelector = 0;