From 4971edc0d06a05874a31b562db247dc35224fbd4 Mon Sep 17 00:00:00 2001 From: Marcelo Riss Date: Mon, 4 Mar 2024 21:49:28 -0300 Subject: [PATCH] Add PreferenceDialog object as a property as a short cut for new preferences pages to have access to the original dialog. --- .../src/main/java/org/weasis/core/ui/pref/PreferenceDialog.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weasis-core/src/main/java/org/weasis/core/ui/pref/PreferenceDialog.java b/weasis-core/src/main/java/org/weasis/core/ui/pref/PreferenceDialog.java index a767ac552..2430e879f 100755 --- a/weasis-core/src/main/java/org/weasis/core/ui/pref/PreferenceDialog.java +++ b/weasis-core/src/main/java/org/weasis/core/ui/pref/PreferenceDialog.java @@ -77,6 +77,8 @@ public PreferenceDialog(Window parentWin) { protected void initializePages() { Hashtable properties = new Hashtable<>(); properties.put("weasis.user.prefs", System.getProperty("weasis.user.prefs", "user")); // NON-NLS + properties.put("weasis.preferences.dialog", this); // pass this object as a property avoiding the need of changing + // createInstance signature. ArrayList list = new ArrayList<>(); GeneralSetting generalSetting = new GeneralSetting(this);