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