mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-22 07:16:38 +00:00
libroar/RoarCanvasCommandsFile.py:canvasSave{,As}(): don't reset dirty on canvasSaveAs().
This commit is contained in:
parent
74e2bf7f49
commit
f65fe72cea
@ -194,7 +194,7 @@ class RoarCanvasCommandsFile():
|
||||
# }}}
|
||||
# {{{ canvasSave(self, event)
|
||||
@GuiCommandDecorator("Save", "&Save", ["", wx.ART_FILE_SAVE], [wx.ACCEL_CTRL, ord("S")], None)
|
||||
def canvasSave(self, event):
|
||||
def canvasSave(self, event, newDirty=False):
|
||||
if self.canvasPathName == None:
|
||||
if self.canvasSaveAs(event) == False:
|
||||
return False
|
||||
@ -203,7 +203,8 @@ class RoarCanvasCommandsFile():
|
||||
self.parentCanvas.SetCursor(wx.Cursor(wx.CURSOR_WAIT))
|
||||
self.parentCanvas.canvas.exportStore.exportTextFile(self.parentCanvas.canvas.map, self.parentCanvas.canvas.size, outFile)
|
||||
self.parentCanvas.SetCursor(wx.Cursor(wx.NullCursor))
|
||||
self.parentCanvas.dirty = False
|
||||
if self.parentCanvas.dirty != newDirty:
|
||||
self.parentCanvas.dirty = newDirty
|
||||
self.update(dirty=self.parentCanvas.dirty)
|
||||
return True
|
||||
except IOError as error:
|
||||
@ -217,7 +218,7 @@ class RoarCanvasCommandsFile():
|
||||
return False
|
||||
else:
|
||||
self.canvasPathName = dialog.GetPath()
|
||||
return self.canvasSave(event)
|
||||
return self.canvasSave(event, newDirty=True)
|
||||
# }}}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user