Core classes should only init with project class and if needed access main gui via project
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ class GuiDocEditor(QTextEdit):
|
||||
self.theTheme = theParent.theTheme
|
||||
self.theIndex = theParent.theIndex
|
||||
self.theProject = theParent.theProject
|
||||
self.nwDocument = NWDoc(self.theProject, self.theParent)
|
||||
self.nwDocument = NWDoc(self.theProject)
|
||||
|
||||
self.docChanged = False # Flag for changed status of document
|
||||
self.spellCheck = False # Flag for spell checking enabled
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ class GuiDocViewer(QTextBrowser):
|
||||
qApp.setOverrideCursor(QCursor(Qt.WaitCursor))
|
||||
|
||||
sPos = self.verticalScrollBar().value()
|
||||
aDoc = ToHtml(self.theProject, self.theParent)
|
||||
aDoc = ToHtml(self.theProject)
|
||||
aDoc.setPreview(self.mainConf.viewComments, self.mainConf.viewSynopsis)
|
||||
aDoc.setLinkHeaders(True)
|
||||
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user