Changeset 16142 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2020-03-15T20:50:44+01:00 (5 years ago)
Author:
simon04
Message:

fix #17683 - LoadAndZoomHandler: retain order of selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/handler/LoadAndZoomHandler.java

    r15482 r16142  
    99import java.util.Collection;
    1010import java.util.Collections;
    11 import java.util.HashSet;
     11import java.util.LinkedHashSet;
    1212import java.util.Set;
    1313import java.util.concurrent.Future;
     
    6565
    6666    // Optional argument 'select'
    67     private final Set<SimplePrimitiveId> toSelect = new HashSet<>();
     67    private final Set<SimplePrimitiveId> toSelect = new LinkedHashSet<>();
    6868
    6969    private boolean isKeepingCurrentSelection;
     
    175175        }
    176176
    177         final Collection<OsmPrimitive> forTagAdd = new HashSet<>();
     177        final Collection<OsmPrimitive> forTagAdd = new LinkedHashSet<>();
    178178        final Bounds bbox = new Bounds(minlat, minlon, maxlat, maxlon);
    179179        if (args.containsKey("select") && PermissionPrefWithDefault.CHANGE_SELECTION.isAllowed()) {
    180180            // select objects after downloading, zoom to selection.
    181181            GuiHelper.executeByMainWorkerInEDT(() -> {
    182                 Set<OsmPrimitive> newSel = new HashSet<>();
     182                Set<OsmPrimitive> newSel = new LinkedHashSet<>();
    183183                DataSet ds = MainApplication.getLayerManager().getEditDataSet();
    184184                if (ds == null) // e.g. download failed
Note: See TracChangeset for help on using the changeset viewer.