From 1c98fbcb819e0359094647bf3611a4c8a72e94b1 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 8 May 2020 22:53:58 +0200 Subject: [PATCH] trashRoot handle should be initialised to None --- nw/core/project.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nw/core/project.py b/nw/core/project.py index ef6558cf..57fc7051 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -929,16 +929,14 @@ class NWTree(): self.theProject = theProject - self._projTree = {} # Holds all the items of the project - self._treeOrder = [] # The order of the tree items on the tree view - self._treeRoots = [] # The root items of the tree - self._trashRoot = "" # The handle of the trash root folder - + self._projTree = {} # Holds all the items of the project + self._treeOrder = [] # The order of the tree items on the tree view + self._treeRoots = [] # The root items of the tree + self._trashRoot = None # The handle of the trash root folder self._theLength = 0 # Always the length of _treeOrder self._theIndex = 0 # The current iterator index self._treeChanged = False # True if tree structure has changed - - self._handleSeed = None # Used for generating handles for testing + self._handleSeed = None # Used for generating handles for testing return @@ -952,7 +950,7 @@ class NWTree(): self._projTree = {} self._treeOrder = [] self._treeRoots = [] - self._trashRoot = "" + self._trashRoot = None self._theLength = 0 self._theIndex = 0 self._treeChanged = False