libgui/GuiCanvasInterface.py:canvasExportAsPng(): correctly pass self.parentFrame to wx.FileDialog().

libgui/GuiCanvasInterface.py: minor cleanup.
assets/text/TODO: updated.
This commit is contained in:
Lucio Andrés Illanes Albornoz 2019-09-04 16:36:57 +02:00
parent 752af56774
commit da8384f3bb
2 changed files with 9 additions and 11 deletions

View File

@ -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, ...)

View File

@ -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.canvasBackend.canvasBitmap, outPathName, wx.BITMAP_TYPE_PNG)
self.parentCanvas.SetCursor(wx.Cursor(wx.NullCursor))
return True
# }}}