From: nds Date: Thu, 18 May 2017 08:56:04 +0000 (+0300) Subject: Issue #1135 Hide all for GEOM objects X-Git-Tag: V_2.7.1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a14fde4f1f1300641d4da6bed18c29d8ceaf98fb;p=modules%2Fshaper.git Issue #1135 Hide all for GEOM objects --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index f332c4aad..855abacc1 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1358,16 +1358,15 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked) else if (theId == "WIREFRAME_CMD") setDisplayMode(aObjects, XGUI_Displayer::Wireframe); else if (theId == "HIDEALL_CMD") { -#ifdef HAVE_SALOME - //issue #2159 Hide all incomplete behavior - viewer()->eraseAll(); -#else QObjectPtrList aList = myDisplayer->displayedObjects(); foreach (ObjectPtr aObj, aList) { if (module()->canEraseObject(aObj)) aObj->setDisplayed(false); } Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); +#ifdef HAVE_SALOME + //issue #2159 Hide all incomplete behavior + viewer()->eraseAll(); #endif updateCommandStatus(); } else if (theId == "SELECT_VERTEX_CMD") { @@ -2038,6 +2037,11 @@ void XGUI_Workshop::showOnlyObjects(const QObjectPtrList& theList) if (module()->canEraseObject(aObj)) aObj->setDisplayed(false); } + Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); +#ifdef HAVE_SALOME + //issue #2159 Hide all incomplete behavior + viewer()->eraseAll(); +#endif // Show only objects from the list foreach (ObjectPtr aObj, theList) {