mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 06:37:17 +00:00
Adapted th qt part to core.gui.directory_tree.
This commit is contained in:
@@ -23,6 +23,11 @@ class DirectoryNode(Node):
|
||||
self._loaded = False
|
||||
self._state = STATE_ORDER.index(self._app.directories.get_state(path))
|
||||
|
||||
def __len__(self):
|
||||
if not self._loaded:
|
||||
self._load()
|
||||
return Node.__len__(self)
|
||||
|
||||
def _load(self):
|
||||
self.clear()
|
||||
subpaths = self._app.directories.get_subfolders(self._directory_path)
|
||||
@@ -30,12 +35,6 @@ class DirectoryNode(Node):
|
||||
self.append(DirectoryNode(self._app, path, path[-1]))
|
||||
self._loaded = True
|
||||
|
||||
@property
|
||||
def children_count(self):
|
||||
if not self._loaded:
|
||||
self._load()
|
||||
return len(self)
|
||||
|
||||
# The state propery is an index to the combobox
|
||||
@property
|
||||
def state(self):
|
||||
|
||||
Reference in New Issue
Block a user