From a882ad2c223aebbc2e4c131bbc688aec8ea23551 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Sun, 12 May 2019 19:54:49 +0200 Subject: [PATCH] Bugfix in item editor --- nw/gui/itemeditor.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nw/gui/itemeditor.py b/nw/gui/itemeditor.py index 2ee19314..5ebbcfe1 100644 --- a/nw/gui/itemeditor.py +++ b/nw/gui/itemeditor.py @@ -25,13 +25,14 @@ logger = logging.getLogger(__name__) class GuiItemEditor(QDialog): - def __init__(self, guiParent, theProject, tHandle): - QDialog.__init__(self, guiParent) + def __init__(self, theParent, theProject, tHandle): + QDialog.__init__(self, theParent) logger.debug("Initialising ItemEditor ...") self.mainConf = nw.CONFIG self.theProject = theProject + self.theParent = theParent self.theItem = self.theProject.getItem(tHandle) self.outerBox = QHBoxLayout() @@ -53,9 +54,9 @@ class GuiItemEditor(QDialog): self.editStatus = QComboBox() self.editLayout = QComboBox() - for n in range(len(self.theProject.statusLabels)): + for n in range(len(self.theParent.statusLabels)): self.editStatus.addItem( - self.theProject.statusIcons[n], self.theProject.statusLabels[n], n + self.theParent.statusIcons[n], self.theParent.statusLabels[n], n ) self.validLayouts = []