Further wxPython4 fixes.

This commit is contained in:
Cas Cremers
2020-10-27 23:38:48 +01:00
parent 9dd73c2e38
commit 85d646b133
3 changed files with 57 additions and 49 deletions

View File

@@ -201,13 +201,12 @@ class AttackDisplay(wx.ScrolledWindow):
res = self.askUserForFilename(style=wx.FD_SAVE, wildcard="*.%s" % (ext), defaultFile = "%s" % (suggested))
return res
def exportImage(self, type,ext=None):
def exportImage(self, imgtype, ext=None):
if ext == None:
ext = type
ext = imgtype
res = self.saveFileName(ext)
if res != None:
cmd = "dot -T%s" % (type)
cmdpushwrite(cmd,self.attack.scytherDot,res)
dotOutputWrite(self.attack.scytherDot,res,["-T" + imgtype])
def OnExportPng(self, event):
self.exportImage("png")