From a0fa89c78f405313f110e7bb6610cca94d1165d3 Mon Sep 17 00:00:00 2001 From: emmanue1 Date: Wed, 25 Dec 2019 15:39:11 +0100 Subject: [PATCH] Update configuration parsing --- .../ClassFileDecompilerPreferencesProvider.java | 2 +- .../main/java/org/jd/gui/view/component/ClassFilePage.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/src/main/java/org/jd/gui/service/preferencespanel/ClassFileDecompilerPreferencesProvider.java b/services/src/main/java/org/jd/gui/service/preferencespanel/ClassFileDecompilerPreferencesProvider.java index 9a4cdf1f..e84a828f 100644 --- a/services/src/main/java/org/jd/gui/service/preferencespanel/ClassFileDecompilerPreferencesProvider.java +++ b/services/src/main/java/org/jd/gui/service/preferencespanel/ClassFileDecompilerPreferencesProvider.java @@ -43,7 +43,7 @@ public ClassFileDecompilerPreferencesProvider() { @Override public void loadPreferences(Map preferences) { escapeUnicodeCharactersCheckBox.setSelected("true".equals(preferences.get(ESCAPE_UNICODE_CHARACTERS))); - realignLineNumbersCheckBox.setSelected(!"false".equals(preferences.get(REALIGN_LINE_NUMBERS))); + realignLineNumbersCheckBox.setSelected("true".equals(preferences.get(REALIGN_LINE_NUMBERS))); } @Override diff --git a/services/src/main/java/org/jd/gui/view/component/ClassFilePage.java b/services/src/main/java/org/jd/gui/view/component/ClassFilePage.java index bdd93be1..f12dafe1 100644 --- a/services/src/main/java/org/jd/gui/view/component/ClassFilePage.java +++ b/services/src/main/java/org/jd/gui/view/component/ClassFilePage.java @@ -64,7 +64,7 @@ public void decompile(Map preferences) { strings.clear(); // Init preferences - boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, true); + boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, false); boolean unicodeEscape = getPreferenceValue(preferences, ESCAPE_UNICODE_CHARACTERS, false); Map configuration = new HashMap<>(); @@ -116,7 +116,7 @@ public void save(API api, OutputStream os) { try { // Init preferences Map preferences = api.getPreferences(); - boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, true); + boolean realignmentLineNumbers = getPreferenceValue(preferences, REALIGN_LINE_NUMBERS, false); boolean unicodeEscape = getPreferenceValue(preferences, ESCAPE_UNICODE_CHARACTERS, false); boolean showLineNumbers = getPreferenceValue(preferences, WRITE_LINE_NUMBERS, true);