Make project instance private to main GUI class

This commit is contained in:
Veronica Berglyd Olsen
2023-08-08 17:21:00 +02:00
parent 94c95d6f67
commit 12897ff2e1
37 changed files with 445 additions and 465 deletions
+2 -3
View File
@@ -41,11 +41,10 @@ class NovelSelector(QComboBox):
novelSelectionChanged = pyqtSignal(str)
def __init__(self, parent, project, mainGui):
def __init__(self, parent, mainGui):
super().__init__(parent=parent)
self._mainGui = mainGui
self._project = project
self._blockSignal = False
self._firstHandle = None
@@ -91,7 +90,7 @@ class NovelSelector(QComboBox):
icon = CONFIG.theme.getIcon(nwLabels.CLASS_ICON[nwItemClass.NOVEL])
handle = self.currentData()
for tHandle, nwItem in self._project.tree.iterRoots(nwItemClass.NOVEL):
for tHandle, nwItem in self._mainGui.project.tree.iterRoots(nwItemClass.NOVEL):
if prefix:
name = prefix.format(nwItem.itemName)
self.addItem(name, tHandle)