From fa319391c004bcd51ab07d15f7b30aa34eddd06b Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Mon, 21 Dec 2020 21:25:04 +0100 Subject: [PATCH] Remove some now redundant checks --- nw/gui/projtree.py | 3 --- nw/guimain.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/nw/gui/projtree.py b/nw/gui/projtree.py index 938729a3..e1802a8b 100644 --- a/nw/gui/projtree.py +++ b/nw/gui/projtree.py @@ -714,9 +714,6 @@ class GuiProjectTree(QTreeWidget): return tHandle = selItem.data(self.C_NAME, Qt.UserRole) - if tHandle is None: - return - tItem = self.theProject.projTree[tHandle] if tItem is None: return diff --git a/nw/guimain.py b/nw/guimain.py index 37042ca5..c03eceea 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -1317,9 +1317,6 @@ class GuiMain(QMainWindow): we open it. Otherwise, we do nothing. """ tHandle = tItem.data(self.treeView.C_NAME, Qt.UserRole) - if tHandle is None: - return - logger.verbose("User double clicked tree item with handle %s" % tHandle) nwItem = self.theProject.projTree[tHandle] if nwItem is not None: