From bc5fb4c0ff30f2c193933a25ee21143e0bac6850 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Wed, 20 Oct 2021 15:18:26 -0600 Subject: [PATCH] Fix JOSM #21455: Merge Address Nodes and Buildings not saving Signed-off-by: Taylor Smock --- .../gui/preferences/MapWithAIPreferences.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java index 84450325..4e28f9cf 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/gui/preferences/MapWithAIPreferences.java @@ -3,6 +3,16 @@ import static org.openstreetmap.josm.tools.I18n.tr; +import javax.swing.Box; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSpinner; +import javax.swing.JTabbedPane; +import javax.swing.SpinnerNumberModel; + import java.awt.Component; import java.awt.Cursor; import java.awt.Dimension; @@ -17,16 +27,6 @@ import java.util.Map; import java.util.TreeMap; -import javax.swing.Box; -import javax.swing.JButton; -import javax.swing.JCheckBox; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JSpinner; -import javax.swing.JTabbedPane; -import javax.swing.SpinnerNumberModel; - import org.openstreetmap.josm.actions.ExpertToggleAction; import org.openstreetmap.josm.data.preferences.BooleanProperty; import org.openstreetmap.josm.gui.preferences.DefaultTabPreferenceSetting; @@ -212,6 +212,7 @@ public void mouseClicked(MouseEvent e) { public boolean ok() { MapWithAIPreferenceHelper.setSwitchLayers(switchLayerCheckBox.isSelected(), true); final Object value = maximumAdditionSpinner.getValue(); + MapWithAIPreferenceHelper.setMergeBuildingAddress(this.mergeBuildingAddressCheckBox.isSelected(), true); if (value instanceof Number) { MapWithAIPreferenceHelper.setMaximumAddition(((Number) value).intValue(), true); }