myTreeView->setExpanded(aIdx, (*aIt));
}
}
+
+void XGUI_ObjectsBrowser::updateAllIndexes(int theColumn, const QModelIndex& theParent)
+{
+ int aNb = myDocModel->rowCount(theParent);
+ for (int i = 0; i < aNb; i++) {
+ QModelIndex aIdx = myDocModel->index(i, theColumn, theParent);
+ if (aIdx.isValid()) {
+ myTreeView->update(aIdx);
+ updateAllIndexes(theColumn, aIdx);
+ }
+ }
+}
void onSelectionChanged();
+ /// Updates all items of object browser
+ /// \param theColumn - column of items
+ /// \param theParent - a parent item (by default from root)
+ void updateAllIndexes(int theColumn = 0, const QModelIndex& theParent = QModelIndex());
public slots:
//! Called on Edit command request
viewer()->eraseAll();
#endif
updateCommandStatus();
+ // 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") {
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();
}
//**************************************************************