myTreeView->setExpanded(aIdx, (*aIt));
}
}
+
+void XGUI_ObjectsBrowser::updateAllIndexes(int theColumn, const QModelIndex& theParent)
+{
+ const QAbstractItemModel* aModel = theParent.model();
+ int aNb = aModel->rowCount();
+ for (int i = 0; i < aNb; i++) {
+ QModelIndex aIdx = theParent.child(i, theColumn);
+ 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
updateCommandStatus();
#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);
- }
- }
+ myObjectBrowser->updateAllIndexes();
#endif
} else if (theId == "SELECT_VERTEX_CMD") {
setViewerSelectionMode(TopAbs_VERTEX);