mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
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:
parent
9317dc97d8
commit
f6fa3e8375
|
@ -75,8 +75,8 @@ class plainText(basicFormat):
|
|||
s[varName] = filename
|
||||
settingsWidget.settings["Output"] = s
|
||||
|
||||
# Save settings
|
||||
settingsWidget.writeSettings()
|
||||
# Save settings
|
||||
settingsWidget.writeSettings()
|
||||
|
||||
return filename
|
||||
|
||||
|
@ -84,14 +84,15 @@ class plainText(basicFormat):
|
|||
settings = settingsWidget.getSettings()
|
||||
|
||||
filename = self.getExportFilename(settingsWidget)
|
||||
settingsWidget.writeSettings()
|
||||
content = self.output(settingsWidget)
|
||||
|
||||
if not content:
|
||||
print("Error: No content. Nothing saved.")
|
||||
return
|
||||
|
||||
if filename:
|
||||
settingsWidget.writeSettings()
|
||||
content = self.output(settingsWidget)
|
||||
|
||||
if not content:
|
||||
print("Error: No content. Nothing saved.")
|
||||
return
|
||||
|
||||
with open(filename, "w", encoding='utf8') as f:
|
||||
f.write(content)
|
||||
|
||||
|
|
Loading…
Reference in a new issue