From a14fde4f1f1300641d4da6bed18c29d8ceaf98fb Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 18 May 2017 11:56:04 +0300 Subject: [PATCH] Issue #1135 Hide all for GEOM objects --- src/XGUI/XGUI_Workshop.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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) { -- 2.39.2