GUI classes should only init with main GUI as parent
This commit is contained in:
+3
-3
@@ -66,17 +66,17 @@ class GuiBuildNovel(QDialog):
|
||||
FMT_JSON_H = 8 # HTML5 wrapped in JSON
|
||||
FMT_JSON_M = 9 # nW Markdown wrapped in JSON
|
||||
|
||||
def __init__(self, theParent, theProject):
|
||||
def __init__(self, theParent):
|
||||
QDialog.__init__(self, theParent)
|
||||
|
||||
logger.debug("Initialising GuiBuildNovel ...")
|
||||
self.setObjectName("GuiBuildNovel")
|
||||
|
||||
self.mainConf = nw.CONFIG
|
||||
self.theProject = theProject
|
||||
self.theParent = theParent
|
||||
self.theTheme = theParent.theTheme
|
||||
self.optState = self.theProject.optState
|
||||
self.theProject = theParent.theProject
|
||||
self.optState = theParent.theProject.optState
|
||||
|
||||
self.htmlText = [] # List of html documents
|
||||
self.htmlStyle = [] # List of html styles
|
||||
|
||||
@@ -56,7 +56,7 @@ class GuiWritingStats(QDialog):
|
||||
FMT_JSON = 0
|
||||
FMT_CSV = 1
|
||||
|
||||
def __init__(self, theParent, theProject):
|
||||
def __init__(self, theParent):
|
||||
QDialog.__init__(self, theParent)
|
||||
|
||||
logger.debug("Initialising GuiWritingStats ...")
|
||||
@@ -64,9 +64,9 @@ class GuiWritingStats(QDialog):
|
||||
|
||||
self.mainConf = nw.CONFIG
|
||||
self.theParent = theParent
|
||||
self.theProject = theProject
|
||||
self.theTheme = theParent.theTheme
|
||||
self.optState = theProject.optState
|
||||
self.theProject = theParent.theProject
|
||||
self.optState = theParent.theProject.optState
|
||||
|
||||
self.logData = []
|
||||
self.filterData = []
|
||||
|
||||
Reference in New Issue
Block a user