Add a function to recalculate the icons for use when the visibility icon preference changes
This commit is contained in:
@@ -3199,6 +3199,20 @@ void TreeWidget::synchronizeSelectionCheckBoxes() {
|
||||
}
|
||||
}
|
||||
|
||||
void TreeWidget::updateVisibilityIcons() {
|
||||
for (auto tree : TreeWidget::Instances) {
|
||||
QSignalBlocker blocker(tree);
|
||||
for (QTreeWidgetItemIterator it(tree); *it; ++it) {
|
||||
auto item = *it;
|
||||
if (item->type() == ObjectType) {
|
||||
auto objitem = static_cast<DocumentObjectItem*>(item);
|
||||
objitem->testStatus(true);
|
||||
}
|
||||
}
|
||||
tree->resizeColumnToContents(0);
|
||||
}
|
||||
}
|
||||
|
||||
QList<QTreeWidgetItem*> TreeWidget::childrenOfItem(const QTreeWidgetItem& item) const {
|
||||
QList children = QList<QTreeWidgetItem*>();
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ public:
|
||||
void itemSearch(const QString &text, bool select);
|
||||
|
||||
static void synchronizeSelectionCheckBoxes();
|
||||
static void updateVisibilityIcons();
|
||||
|
||||
QList<QTreeWidgetItem *> childrenOfItem(const QTreeWidgetItem &item) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user