Modify ↓
Opened 9 months ago
Closed 9 months ago
#19285 closed enhancement (fixed)
[Patch] Ctrl+C (Copy) should keep the order of selection
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 20.05 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description (last modified by )
Ctrl+C uses a HashSet to store selected elements and thus forgets the order.
It should keep the order as with this patch:
-
src/org/openstreetmap/josm/gui/datatransfer/data/PrimitiveTransferData.java
6 6 import java.util.ArrayList; 7 7 import java.util.Collection; 8 8 import java.util.Collections; 9 import java.util. HashSet;9 import java.util.LinkedHashSet; 10 10 import java.util.LinkedList; 11 11 import java.util.Queue; 12 import java.util.Set; 12 13 13 14 import org.openstreetmap.josm.data.ProjectionBounds; 14 15 import org.openstreetmap.josm.data.coor.EastNorth; … … 63 64 */ 64 65 private PrimitiveTransferData(Collection<? extends OsmPrimitive> primitives, ReferenceGetter referencedGetter) { 65 66 // convert to hash set first to remove duplicates 66 HashSet<OsmPrimitive> visited = newHashSet<>(primitives);67 Set<OsmPrimitive> visited = new LinkedHashSet<>(primitives); 67 68 this.direct = new ArrayList<>(visited.size()); 68 69 69 70 this.referenced = new ArrayList<>();
Attachments (0)
Change History (3)
comment:1 Changed 9 months ago by
Description: | modified (diff) |
---|---|
Milestone: | → 20.05 |
Summary: | Ctrl+C (Copy) should prevent the order of selection → [Patch] Ctrl+C (Copy) should keep the order of selection |
comment:2 Changed 9 months ago by
Note: See
TracTickets for help on using
tickets.
+1