Added closing of document feature
This commit is contained in:
+10
-3
@@ -258,8 +258,11 @@ class GuiMain(QMainWindow):
|
||||
if not self.closeProject():
|
||||
return False
|
||||
|
||||
# Do the stuff
|
||||
self.theProject.openProject(projFile)
|
||||
# Try to open the project
|
||||
if not self.theProject.openProject(projFile):
|
||||
return False
|
||||
|
||||
# Update GUI
|
||||
self._setWindowTitle(self.theProject.projName)
|
||||
self.rebuildTree()
|
||||
self.docEditor.setPwl(path.join(self.theProject.projMeta, nwFiles.PROJ_DICT))
|
||||
@@ -301,7 +304,6 @@ class GuiMain(QMainWindow):
|
||||
self.saveDocument()
|
||||
self.theDocument.clearDocument()
|
||||
self.docEditor.clearEditor()
|
||||
self.theProject.setLastEdited(None)
|
||||
return True
|
||||
|
||||
def openDocument(self, tHandle):
|
||||
@@ -478,6 +480,11 @@ class GuiMain(QMainWindow):
|
||||
self.docViewer.setFocus()
|
||||
return
|
||||
|
||||
def closeDocEditor(self):
|
||||
self.closeDocument()
|
||||
self.theProject.setLastEdited(None)
|
||||
return
|
||||
|
||||
def closeDocViewer(self):
|
||||
self.docViewer.clearViewer()
|
||||
self.theProject.setLastViewed(None)
|
||||
|
||||
Reference in New Issue
Block a user