Clean up item notification and item main icon

This commit is contained in:
Veronica Berglyd Olsen
2024-11-21 01:18:28 +01:00
parent 55eed706fb
commit d55f53be0a
13 changed files with 63 additions and 117 deletions
+8
View File
@@ -248,6 +248,14 @@ class NWTree:
self._project.setProjectChanged(True)
return
def refreshAllItems(self) -> None:
"""Refresh all items in the tree."""
for node in reversed(self._model.root.allChildren()):
node.refresh()
node.updateCount(propagate=False)
self._model.layoutChanged.emit()
return
def checkConsistency(self, prefix: str) -> tuple[int, int]:
"""Check the project tree consistency. Also check the content
folder and add back files that were discovered but were not