diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-02-17 17:54:01 +0100 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-02-17 17:54:01 +0100 |
commit | b65953ad6b08a76d0fe157b53155543d0ec9e336 (patch) | |
tree | 8a6bf863e91837fb46dd57e10ff6bd2eb317444b | |
parent | 76018bf5e46ee440457204c1f52b6f61dc03fcc1 (diff) | |
download | pdf-over-b65953ad6b08a76d0fe157b53155543d0ec9e336.tar.gz pdf-over-b65953ad6b08a76d0fe157b53155543d0ec9e336.tar.bz2 pdf-over-b65953ad6b08a76d0fe157b53155543d0ec9e336.zip |
prevent custom signature notes from being overwritten at start-up (typo fix cf. aaeeda193)
-rw-r--r-- | pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java | 14 |
1 files changed, 6 insertions, 8 deletions
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) |