1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

Fix preview not updating

This commit is contained in:
Reinhard Pointner 2016-03-30 16:43:40 +00:00
parent 61780da8a9
commit 2d9d388c56

View File

@ -525,7 +525,7 @@ public class FormatDialog extends JDialog {
@Override
protected void done() {
try {
String value = get().trim();
preview.setText(get().trim());
// check internal script exception
if (format.caughtScriptException() != null) {
@ -533,12 +533,11 @@ public class FormatDialog extends JDialog {
}
// check empty output
if (value.isEmpty()) {
if (preview.getText().isEmpty()) {
throw new Exception("Formatted value is empty");
}
// no warning or error
preview.setText(value);
status.setVisible(false);
} catch (CancellationException e) {
// ignore, cancelled tasks are obsolete anyway