Changed the way creating new, and closing projects is done to make it more roubust
This commit is contained in:
@@ -36,6 +36,11 @@ class NWDoc():
|
||||
|
||||
return
|
||||
|
||||
def clearDocument(self):
|
||||
self.theItem = None
|
||||
self.docHandle = None
|
||||
return
|
||||
|
||||
def openDocument(self, tHandle):
|
||||
|
||||
self.docHandle = tHandle
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user