From e481c8026c1361d3ac5adb01f8d442e04e29a272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Wed, 4 Sep 2019 16:36:57 +0200 Subject: [PATCH] libgui/GuiCanvasInterface.py:canvasExportAsPng(): correctly pass self.parentFrame to wx.FileDialog(). libgui/GuiCanvasInterface.py: minor cleanup. assets/text/TODO: updated. --- assets/text/TODO | 12 ++++++------ libgui/GuiCanvasInterface.py | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/assets/text/TODO b/assets/text/TODO index a7f27cf..072c487 100644 --- a/assets/text/TODO +++ b/assets/text/TODO @@ -1,11 +1,11 @@ 1) General {cleanup,refactor} 2) Incremental auto{load,save} & {backup,restore} -3) GUI: a) scrollbar b) switch from wxPython to GTK -4) Open and toggle a reference image in the background -5) Client-Server or Peer-to-Peer realtime collaboration -6) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.) -7) Hotkey & graphical interfaces to {composed,parametrised} tools -8) Layer, layout (e.g. for comics, zines, etc.) & {re,un}do canvas traits +3) Open and toggle a reference image in the background +4) Client-Server or Peer-to-Peer realtime collaboration +5) Arbitrary {format,palette}s ({4,8} bit ANSI/mIRC, etc.) +6) Hotkey & graphical interfaces to {composed,parametrised} tools +7) Layer, layout (e.g. for comics, zines, etc.) & {re,un}do canvas traits +8) GUI: a) scrollbar b) switch from wxPython to GTK c) revisit About dialogue 9) {Insert,{ex,im}port}ing from/to ANSI, Blender, GIF, HTML, mIRC, printer, SAUCE, WEBM, etc. {clipboard,file} 10) Asset management (e.g. kade, lion, etc.) & traits w/ simple linking & synchronised editing respecting layers 11) Sprites & scripted (Python?) animation on the basis of asset traits and {composable,parametrised} patterns (metric flow, particle system, rigging, ...) diff --git a/libgui/GuiCanvasInterface.py b/libgui/GuiCanvasInterface.py index 0cfdba8..c5cdd40 100644 --- a/libgui/GuiCanvasInterface.py +++ b/libgui/GuiCanvasInterface.py @@ -117,16 +117,14 @@ class GuiCanvasInterface(): # }}} # {{{ canvasExportAsPng(self, event): XXX def canvasExportAsPng(self, event): - with wx.FileDialog(self, "Save As...", os.getcwd(), "", \ - "*.png", wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) as dialog: + with wx.FileDialog(self.parentFrame, "Save As...", os.getcwd(), "", "*.png", wx.FD_SAVE|wx.FD_OVERWRITE_PROMPT) as dialog: if dialog.ShowModal() == wx.ID_CANCEL: return False else: outPathName = dialog.GetPath() self.parentCanvas.SetCursor(wx.Cursor(wx.CURSOR_WAIT)) - self.parentCanvas.canvasExportStore.exportBitmapToPngFile( \ - self.parentCanvas.canvasBackend.canvasBitmap, outPathName, \ - wx.BITMAP_TYPE_PNG) + self.parentCanvas.canvasExportStore.exportBitmapToPngFile( \ + self.parentCanvas.canvasBackend.canvasBitmap, outPathName, wx.BITMAP_TYPE_PNG) self.parentCanvas.SetCursor(wx.Cursor(wx.NullCursor)) return True # }}}