All exports fail to overwrite existing files

Description

Reproduce
Open a character and attempt to export it to PDF. In the file chooser dialog, select an existing file. You will be prompted if you wish to overwrite, say yes. Overwrite will silently fail.

Cause
The root cause is an attempt to invoke JavaFX Alert dialog in a swing worker thread, this is illegal and terminates the worker by unhandled exception. Exception is raised when Alert created inside the block at ExportDialog.java:377

Solution
Easiest solution is deletion of the block in question, it serves no more purpose. This FileChooser picker will prompt user if he wants to overwrite always. This would make the alert dialog in question a second confirmation.

Also, I do not believe you can suppress the chooser asking if you want to overwrite, I don't see an option in JavaFX FileChooser to toggle this. I may be wrong, not used JavaFX much. This would render SettingsHandler.getAlwaysOverwrite() preference obsolete. It is a shame, I can see that prompt being quite annoying for repeated overwrites.

is related, it was a request to add overwrite preference to the file selection dialog. If the preference now useless can be closed.

Environment

Linux, JDK 12 – Will affect any environment.

Status

Assignee

starcraft.man

Reporter

starcraft.man

Labels

Source Books

None

Data/LST Monkey

None

Theme

None

Theme

None

Dependent Data

None

Subtype

None

Contact Person

None

Email

None

Publisher Website

None

Permission Level

None

Epic/Theme

None

Pending User Input

No

Components

Affects versions

Priority

Minor
Configure