From fe7d50e816b6126b96466512fb49cfa1811b5555 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 6 Dec 2017 17:55:03 +0300 Subject: [PATCH] Issue #2328: Update all items in ObjectBrowser on ShowOnly command --- src/XGUI/XGUI_Workshop.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 91d8757f2..cb0f7a099 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -1472,10 +1472,8 @@ void XGUI_Workshop::onContextMenuCommand(const QString& theId, bool isChecked) viewer()->eraseAll(); #endif updateCommandStatus(); -#ifndef WIN32 - // Necessary for update icons in ObjectBrowser on Linux - myObjectBrowser->updateAllIndexes(); -#endif + // Necessary for update icons in ObjectBrowser on Linux + myObjectBrowser->updateAllIndexes(); } else if (theId == "SELECT_VERTEX_CMD") { setViewerSelectionMode(TopAbs_VERTEX); } else if (theId == "SELECT_EDGE_CMD") { @@ -2396,15 +2394,9 @@ void XGUI_Workshop::showOnlyObjects(const QObjectPtrList& theList) aObj->setDisplayed(true); } Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); -#ifndef WIN32 + // Necessary for update icons in ObjectBrowser on Linux - QModelIndexList aIndexes = mySelector->selection()->selectedIndexes(); - foreach (QModelIndex aIdx, aIndexes) { - if (aIdx.column() == 0) { - myObjectBrowser->treeView()->update(aIdx); - } - } -#endif + myObjectBrowser->updateAllIndexes(); } //************************************************************** -- 2.39.2