- Timestamp:
- 2017-12-17T20:27:00+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java
r13109 r13212 10 10 import java.util.Collections; 11 11 import java.util.HashSet; 12 import java.util.Locale; 12 13 import java.util.Set; 13 14 import java.util.concurrent.Future; … … 60 61 // Optional argument 'select' 61 62 private final Set<SimplePrimitiveId> toSelect = new HashSet<>(); 63 64 private Boolean isKeepingCurrentSelection = false; 62 65 63 66 @Override … … 160 163 * deselect objects if parameter addtags given 161 164 */ 162 if (args.containsKey("addtags") ) {165 if (args.containsKey("addtags") && !isKeepingCurrentSelection) { 163 166 GuiHelper.executeByMainWorkerInEDT(() -> { 164 167 DataSet ds = MainApplication.getLayerManager().getEditDataSet(); … … 185 188 } 186 189 } 190 if (isKeepingCurrentSelection) { 191 Collection<OsmPrimitive> sel = ds.getSelected(); 192 newSel.addAll(sel); 193 forTagAdd.addAll(sel); 194 } 187 195 toSelect.clear(); 196 isKeepingCurrentSelection = false; 188 197 ds.setSelected(newSel); 189 198 zoom(newSel, bbox); … … 287 296 for (String item : args.get("select").split(",")) { 288 297 if (!item.isEmpty()) { 298 if ("currentselection".equals(item.toLowerCase(Locale.ENGLISH))) { 299 isKeepingCurrentSelection = true; 300 continue; 301 } 289 302 try { 290 303 toSelect.add(SimplePrimitiveId.fromString(item));
Note:
See TracChangeset
for help on using the changeset viewer.