Changeset 35915 in osm for applications/editors
- Timestamp:
- 2022-02-09T19:26:58+01:00 (3 years ago)
- Location:
- applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/BuildingSizeDialog.java
r34968 r35915 22 22 private final JCheckBox caddr = new JCheckBox(tr("Use Address dialog")); 23 23 private final JCheckBox cAutoSelect = new JCheckBox(tr("Auto-select building")); 24 private final JCheckBox cAutoSelectReplaceSelection = new JCheckBox(tr("Auto-select replaces existing selection")); 24 25 private final JCheckBox cAddrNode = new JCheckBox(tr("Use address nodes under buildings")); 25 26 private final JRadioButton circleRadio = new JRadioButton(tr("Circle")); … … 42 43 panel.add(caddr, GBC.eol().fill(GBC.HORIZONTAL)); 43 44 panel.add(cAutoSelect, GBC.eol().fill(GBC.HORIZONTAL)); 45 panel.add(cAutoSelectReplaceSelection, GBC.eol().fill(GBC.HORIZONTAL)); 44 46 panel.add(cAddrNode, GBC.eol().fill(GBC.HORIZONTAL)); 45 47 … … 48 50 caddr.setSelected(ToolSettings.isUsingAddr()); 49 51 cAutoSelect.setSelected(ToolSettings.isAutoSelect()); 52 cAutoSelectReplaceSelection.setSelected(ToolSettings.isAutoSelectReplaceSelection()); 50 53 cAddrNode.setSelected(ToolSettings.PROP_USE_ADDR_NODE.get()); 51 54 … … 95 98 ToolSettings.setAddrDialog(useAddr()); 96 99 ToolSettings.setAutoSelect(cAutoSelect.isSelected()); 100 ToolSettings.setAutoSelectReplaceSelection(cAutoSelectReplaceSelection.isSelected()); 97 101 ToolSettings.PROP_USE_ADDR_NODE.put(cAddrNode.isSelected()); 98 102 } -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/DrawBuildingAction.java
r35823 r35915 351 351 showAddrDialog(w); 352 352 if (ToolSettings.isAutoSelect() 353 && (getLayerManager().getEditDataSet().getSelected().isEmpty() || shift)) { 353 && (getLayerManager().getEditDataSet().getSelected().isEmpty() || shift || 354 ToolSettings.isAutoSelectReplaceSelection())) { 354 355 getLayerManager().getEditDataSet().setSelected(w); 355 356 } -
applications/editors/josm/plugins/buildings_tools/src/org/openstreetmap/josm/plugins/buildings_tools/ToolSettings.java
r35669 r35915 31 31 private static boolean useAddr; 32 32 private static final Map<String, String> TAGS = new HashMap<>(); 33 private static boolean autoSelect;34 33 35 34 public static Shape getShape() { … … 120 119 121 120 public static boolean isAutoSelect() { 122 return autoSelect;121 return Config.getPref().getBoolean("buildings_tools.autoselect", false); 123 122 } 124 123 125 124 public static void setAutoSelect(boolean autoSelect) { 126 ToolSettings.autoSelect = autoSelect; 125 Config.getPref().putBoolean("buildings_tools.autoselect", autoSelect); 126 } 127 128 public static boolean isAutoSelectReplaceSelection() { 129 return Config.getPref().getBoolean("buildings_tools.autoselect_replace_selection", false); 130 } 131 132 public static void setAutoSelectReplaceSelection(boolean autoSelectReplace) { 133 Config.getPref().putBoolean("buildings_tools.autoselect_replace_selection", autoSelectReplace); 127 134 } 128 135
Note:
See TracChangeset
for help on using the changeset viewer.