Ignore:
Timestamp:
2013-10-23T20:08:09+02:00 (6 years ago)
Author:
akks
Message:

fix #9200: repair tags copy-pasting

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/CopyAction.java

    r6320 r6321  
    2424 */
    2525public 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+";
    2629
    2730    /**
     
    5356        StringBuilder idsBuilder = new StringBuilder();
    5457        for (OsmPrimitive p : primitives) {
    55             idsBuilder.append(OsmPrimitiveType.from(p)).append(" ");
     58            idsBuilder.append(OsmPrimitiveType.from(p).getAPIName()).append(" ");
    5659            idsBuilder.append(p.getId()).append(",");
    5760        }
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r6258 r6321  
    254254
    255255        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)) {
    257257            pasteTagsFromJOSMBuffer(selection);
    258258        } else {
Note: See TracChangeset for help on using the changeset viewer.