From b65953ad6b08a76d0fe157b53155543d0ec9e336 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 17 Feb 2022 17:54:01 +0100 Subject: prevent custom signature notes from being overwritten at start-up (typo fix cf. aaeeda193) --- .../gui/workflow/states/PrepareConfigurationState.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pdf-over-gui') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index 579848cf..42c33fb4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java @@ -151,16 +151,14 @@ public class PrepareConfigurationState extends State { Locale loc = config.getSignatureLocale(); String note_old = Messages.getString("simple_config.Note_Default_Old", loc); //$NON-NLS-1$ - if (!note.equals(note_old)) { - updateSignatureNoteField(config); - } + if (note.equals(note_old)) + resetSignatureNoteField(config); } - private void updateSignatureNoteField(ConfigProvider config){ - String note; - String profile = config.getSignatureProfile(); - note = Profile.getSignatureBlockNoteTextAccordingToProfile(Profile.getProfile(profile), config.getLocale()); - getStateMachine().getConfigManipulator().setSignatureNote(note); + private void resetSignatureNoteField(ConfigProvider config){ + getStateMachine().getConfigManipulator().setSignatureNote( + Profile.getSignatureBlockNoteTextAccordingToProfile(Profile.getProfile(config.getSignatureProfile()), config.getLocale()) + ); } private void initializeFromArguments(String[] args, ArgumentHandler handler) -- cgit v1.2.3