Changeset 6321 in josm
- Timestamp:
- 2013-10-23T20:08:09+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CopyAction.java
r6320 r6321 24 24 */ 25 25 public final class CopyAction extends JosmAction { 26 27 // regular expression that matches text clipboard contents after copying 28 public static final String CLIPBOARD_REGEXP = "((node|way|relation)\\s\\d+,)*(node|way|relation)\\s\\d+"; 26 29 27 30 /** … … 53 56 StringBuilder idsBuilder = new StringBuilder(); 54 57 for (OsmPrimitive p : primitives) { 55 idsBuilder.append(OsmPrimitiveType.from(p) ).append(" ");58 idsBuilder.append(OsmPrimitiveType.from(p).getAPIName()).append(" "); 56 59 idsBuilder.append(p.getId()).append(","); 57 60 } -
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r6258 r6321 254 254 255 255 String buf = Utils.getClipboardContent(); 256 if (buf == null || buf.isEmpty() || buf.matches( "(\\d+,)*\\d+")) {256 if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) { 257 257 pasteTagsFromJOSMBuffer(selection); 258 258 } else { -
trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
r6319 r6321 38 38 39 39 import org.openstreetmap.josm.Main; 40 import org.openstreetmap.josm.actions.CopyAction; 40 41 import org.openstreetmap.josm.actions.PasteTagsAction; 41 42 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 334 335 335 336 String buf = Utils.getClipboardContent(); 336 if (buf == null || buf.isEmpty() || buf.matches( "(\\d+,)*\\d+")) {337 if (buf == null || buf.isEmpty() || buf.matches(CopyAction.CLIPBOARD_REGEXP)) { 337 338 List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded(); 338 339 if (directlyAdded==null || directlyAdded.isEmpty()) return;
Note:
See TracChangeset
for help on using the changeset viewer.