Core classes should only init with project class and if needed access main gui via project

This commit is contained in:
Veronica K. B. Olsen
2021-04-25 17:39:52 +02:00
parent 45f726669e
commit 48695651e1
19 changed files with 56 additions and 61 deletions
+2 -2
View File
@@ -286,7 +286,7 @@ class GuiProjectTree(QTreeWidget):
return True
# This is a new files, so let's add some content
newDoc = NWDoc(self.theProject, self.theParent)
newDoc = NWDoc(self.theProject)
curTxt = newDoc.readDocument(tHandle)
if curTxt is None:
curTxt = ""
@@ -527,7 +527,7 @@ class GuiProjectTree(QTreeWidget):
if self.theParent.docEditor.theHandle == tHandle:
self.theParent.closeDocument()
theDoc = NWDoc(self.theProject, self.theParent)
theDoc = NWDoc(self.theProject)
theDoc.deleteDocument(tHandle)
self.theIndex.deleteHandle(tHandle)
self._deleteTreeItem(tHandle)