Ignore:
Timestamp:
2016-07-23T15:15:14+02:00 (3 years ago)
Author:
Don-vip
Message:

see #12478 - Use ​Swing Copy/Paste instead of CopyAction/PasteAction with custom buffer (layer part: patch by michael2402, modified) - gsoc-core

File:
1 edited

Legend:

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

    r10604 r10605  
    1919import org.openstreetmap.josm.gui.datatransfer.PrimitiveTransferable;
    2020import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData;
     21import org.openstreetmap.josm.gui.layer.OsmDataLayer;
    2122import org.openstreetmap.josm.tools.Shortcut;
    2223
     
    4849        }
    4950
    50         copy(selection);
     51        copy(getLayerManager().getEditLayer(), selection);
    5152    }
    5253
     
    5455     * Copies the given primitive ids to the clipboard. The output by this function
    5556     * looks similar to: node 1089302677,node 1089303458,way 93793372
     57     * @param source The OSM data layer source
    5658     * @param primitives The OSM primitives to copy
    5759     */
    58     public static void copy(Collection<OsmPrimitive> primitives) {
     60    public static void copy(OsmDataLayer source, Collection<OsmPrimitive> primitives) {
    5961        // copy ids to the clipboard
    60         ClipboardUtils.copy(new PrimitiveTransferable(PrimitiveTransferData.getDataWithReferences(primitives)));
     62        ClipboardUtils.copy(new PrimitiveTransferable(PrimitiveTransferData.getDataWithReferences(primitives), source));
    6163    }
    6264
Note: See TracChangeset for help on using the changeset viewer.