Changeset 8194 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-04-14T23:10:19+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CopyAction.java
r6920 r8194 57 57 public static void copy(OsmDataLayer source, Collection<OsmPrimitive> primitives) { 58 58 /* copy ids to the clipboard */ 59 String ids = getCopyString(primitives); 60 Utils.copyToClipboard(ids); 61 62 Main.pasteBuffer.makeCopy(primitives); 63 Main.pasteSource = source; 64 } 65 66 public static String getCopyString(Collection<? extends OsmPrimitive> primitives) { 59 67 StringBuilder idsBuilder = new StringBuilder(); 60 68 for (OsmPrimitive p : primitives) { … … 62 70 idsBuilder.append(p.getId()).append(","); 63 71 } 64 String ids = idsBuilder.substring(0, idsBuilder.length() - 1); 65 Utils.copyToClipboard(ids); 66 67 Main.pasteBuffer.makeCopy(primitives); 68 Main.pasteSource = source; 72 return idsBuilder.substring(0, idsBuilder.length() - 1); 69 73 } 70 74 -
trunk/src/org/openstreetmap/josm/data/osm/SimplePrimitiveId.java
r7005 r8194 12 12 private final OsmPrimitiveType type; 13 13 14 public static final Pattern ID_PATTERN = Pattern.compile("((n(ode)?|w(ay)?|r(el(ation)?)?) /?)(\\d+)");14 public static final Pattern ID_PATTERN = Pattern.compile("((n(ode)?|w(ay)?|r(el(ation)?)?)[ /]?)(\\d+)"); 15 15 16 16 public SimplePrimitiveId(long id, OsmPrimitiveType type) {
Note:
See TracChangeset
for help on using the changeset viewer.