Changed the way creating new, and closing projects is done to make it more roubust

This commit is contained in:
Veronica K. B. Olsen
2019-05-24 00:37:45 +02:00
parent 85a09f936e
commit ad79b60961
9 changed files with 255 additions and 39 deletions
+5
View File
@@ -36,6 +36,11 @@ class NWDoc():
return
def clearDocument(self):
self.theItem = None
self.docHandle = None
return
def openDocument(self, tHandle):
self.docHandle = tHandle
+4 -3
View File
@@ -120,8 +120,6 @@ class NWProject():
def newProject(self):
self.clearProject()
hNovel = self.newRoot("Novel", nwItemClass.NOVEL)
hChars = self.newRoot("Characters", nwItemClass.CHARACTER)
hWorld = self.newRoot("Plot", nwItemClass.PLOT)
@@ -318,7 +316,10 @@ class NWProject():
##
def setProjectPath(self, projPath):
self.projPath = projPath
if projPath is None or projPath == "":
self.projPath = None
else:
self.projPath = projPath
self.setProjectChanged(True)
return True