source: josm/trunk/src/org/openstreetmap/josm/actions/PasteAction.java@ 11240

Last change on this file since 11240 was 10766, checked in by Don-vip, 8 years ago

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

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2// Author: David Earl
3package org.openstreetmap.josm.actions;
4
5import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
6import static org.openstreetmap.josm.tools.I18n.tr;
7
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.Main;
11import org.openstreetmap.josm.tools.Shortcut;
12
13/**
14 * Paste OSM primitives from clipboard to the current edit layer.
15 * @since 404
16 */
17public final class PasteAction extends AbstractPasteAction {
18
19 /**
20 * Constructs a new {@code PasteAction}.
21 */
22 public PasteAction() {
23 super(tr("Paste"), "paste", tr("Paste contents of clipboard."),
24 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.CTRL), true);
25 putValue("help", ht("/Action/Paste"));
26 // CUA shortcut for paste (https://en.wikipedia.org/wiki/IBM_Common_User_Access#Description)
27 Main.registerActionShortcut(this,
28 Shortcut.registerShortcut("system:paste:cua", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_INSERT, Shortcut.SHIFT));
29 }
30}
Note: See TracBrowser for help on using the repository browser.