Ignore:
Timestamp:
2016-08-07T22:52:29+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13290 - pasting from other layer changes objects position (modified patch by michael2402) - gsoc-core

File:
1 edited

Legend:

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

    r10682 r10766  
    1010import java.util.Collection;
    1111
    12 import org.openstreetmap.josm.Main;
    1312import org.openstreetmap.josm.data.osm.OsmPrimitive;
    14 import org.openstreetmap.josm.gui.datatransfer.OsmTransferHandler;
    1513import org.openstreetmap.josm.gui.datatransfer.PrimitiveTransferable;
    1614import org.openstreetmap.josm.gui.datatransfer.data.PrimitiveTransferData;
     
    2018 * An action that duplicates the given nodes. They are not added to the clipboard.
    2119 */
    22 public final class DuplicateAction extends JosmAction {
     20public final class DuplicateAction extends AbstractPasteAction {
    2321
    2422    /**
     
    3533    public void actionPerformed(ActionEvent e) {
    3634        PrimitiveTransferData data = PrimitiveTransferData.getDataWithReferences(getLayerManager().getEditDataSet().getSelected());
    37         new OsmTransferHandler().pasteOn(Main.getLayerManager().getEditLayer(),
    38                 PasteAction.computePastePosition(e, getValue(NAME)), new PrimitiveTransferable(data));
     35        doPaste(e, new PrimitiveTransferable(data));
    3936    }
    4037
Note: See TracChangeset for help on using the changeset viewer.