From 08a596f683652d0694b58dbb14eadfe11163c803 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 29 Nov 2017 19:45:57 +0300 Subject: [PATCH] Issue #2288: Update column with icons in object browser on Linux --- src/XGUI/XGUI_Workshop.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index e1081a65b..17be4e530 100755 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2214,6 +2214,15 @@ void XGUI_Workshop::showObjects(const QObjectPtrList& theList, bool isVisible) aObj->setDisplayed(isVisible); } 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 } //************************************************************** @@ -2239,6 +2248,15 @@ 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 } -- 2.39.2