Add some clear data functions

This commit is contained in:
Veronica Berglyd Olsen
2024-11-22 00:44:14 +01:00
parent ffe6cd0a65
commit a64ed405f3
8 changed files with 29 additions and 15 deletions
+1
View File
@@ -109,6 +109,7 @@ class NWTree:
def clear(self) -> None:
"""Clear the item tree entirely."""
oldModel = self._model
oldModel.clear()
self._model = ProjectModel(self)
self._items.clear()
self._nodes.clear()