Moved main menu to its own class, and reshuffled some of the logic in opening and saving projects

This commit is contained in:
Veronica K. B. Olsen
2019-04-27 14:49:54 +02:00
parent 3b43b75b3a
commit fdf41f383a
3 changed files with 175 additions and 166 deletions
+7 -3
View File
@@ -163,7 +163,7 @@ class NWProject():
for xValue in xItem:
nwItem.setFromTag(xValue.tag,xValue.text)
self._appendItem(tHandle,pHandle,nwItem)
self._makeStatusIcons()
self.mainConf.setRecent(self.projPath)
@@ -176,8 +176,12 @@ class NWProject():
return False
if not path.isdir(self.projPath):
logger.info("Created folder %s" % self.projPath)
mkdir(self.projPath)
try:
mkdir(self.projPath)
logger.info("Created folder %s" % self.projPath)
except:
logger.error("Could not create folder %s" % self.projPath)
return False
logger.debug("Saving project: %s" % self.projPath)