From e2183acf463c4abf06223055f655f0aa8f8a67fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 24 Sep 2019 18:09:05 +0200 Subject: [PATCH] Update canvas filename on save as. libroar/RoarCanvasCommandsFile.py:{_importFile,canvasSaveAs}(): fix return values. --- libroar/RoarCanvasCommandsFile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libroar/RoarCanvasCommandsFile.py b/libroar/RoarCanvasCommandsFile.py index d29b1fc..2dbffd6 100644 --- a/libroar/RoarCanvasCommandsFile.py +++ b/libroar/RoarCanvasCommandsFile.py @@ -50,6 +50,7 @@ class RoarCanvasCommandsFile(): elif self._promptSaveChanges(): pathName = dialog.GetPath(); self.lastDir = os.path.dirname(pathName); self._storeLastDir(self.lastDir); return self._import(f, newDirty, pathName) + return False, None def _loadLastDir(self): localConfFileName = getLocalConfPathName("RecentDir.txt") @@ -270,8 +271,12 @@ class RoarCanvasCommandsFile(): return False else: self.canvasPathName = dialog.GetPath(); self.lastDir = os.path.dirname(self.canvasPathName); self._storeLastDir(self.lastDir); - if self.canvasSave(event, newDirty=True): + if self.canvasSave(event, newDirty=False): + self.update(pathName=self.canvasPathName) self._pushRecent(self.canvasPathName) + return True + else: + return False def __init__(self): self.imgurApiKey, self.lastFiles, self.lastDir = ImgurApiKey.imgurApiKey if haveImgurApiKey else None, [], None