Do not export if user presses cancel

This commit is contained in:
DarkPhoenix
2019-02-12 13:28:18 +03:00
parent d55d6c3e5e
commit 9eea99f600

View File

@@ -746,14 +746,16 @@ class MainFrame(wx.Frame):
CopySelectDialog.copyFormatMultiBuy: self.clipboardMultiBuy,
CopySelectDialog.copyFormatEfs: self.clipboardEfs}
dlg = CopySelectDialog(self)
dlg.ShowModal()
selected = dlg.GetSelected()
options = dlg.GetOptions()
btnPressed = dlg.ShowModal()
if btnPressed == wx.ID_OK:
selected = dlg.GetSelected()
options = dlg.GetOptions()
settings = SettingsProvider.getInstance().getSettings("pyfaExport")
settings["format"] = selected
settings["options"] = options
CopySelectDict[selected](options.get(selected))
settings = SettingsProvider.getInstance().getSettings("pyfaExport")
settings["format"] = selected
settings["options"] = options
CopySelectDict[selected](options.get(selected))
try:
dlg.Destroy()