Salome HOME
Issue #2288: Update column with icons in object browser on Linux
[modules/shaper.git] / src / XGUI / XGUI_Workshop.cpp
index e1081a65bd31f6ec7ccd0b511c2de04fbe6c0256..17be4e5309218cd94261291618e6ae54b8dc33ff 100755 (executable)
@@ -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
 }