Do not try to export after dismissing the dialog

I happened to notice the UI briefly locking up when testing my previous
changes on some of the Pandoc exporters. While the bigger mess I found
along the way is more than a little fix can handle, this stopgap measure
will at least stop us from running pandoc when it isn't needed.
This commit is contained in:
Jan Wester 2019-08-09 00:47:56 +02:00 committed by Curtis Gedak
parent 9317dc97d8
commit f6fa3e8375

View file

@ -84,6 +84,8 @@ class plainText(basicFormat):
settings = settingsWidget.getSettings()
filename = self.getExportFilename(settingsWidget)
if filename:
settingsWidget.writeSettings()
content = self.output(settingsWidget)
@ -91,7 +93,6 @@ class plainText(basicFormat):
print("Error: No content. Nothing saved.")
return
if filename:
with open(filename, "w", encoding='utf8') as f:
f.write(content)