Changeset 1814 in josm for trunk/src/org/openstreetmap/josm/actions/PasteAction.java
- Timestamp:
- 2009-07-19T19:04:49+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r1750 r1814 31 31 public PasteAction() { 32 32 super(tr("Paste"), "paste", tr("Paste contents of paste buffer."), 33 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true);33 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true); 34 34 setEnabled(false); 35 35 } … … 39 39 } 40 40 41 public staticvoid pasteData(DataSet pasteBuffer, Layer source, ActionEvent e) {41 public void pasteData(DataSet pasteBuffer, Layer source, ActionEvent e) { 42 42 /* Find the middle of the pasteBuffer area */ 43 43 double maxEast = -1E100, minEast = 1E100, maxNorth = -1E100, minNorth = 1E100; … … 63 63 64 64 HashMap<OsmPrimitive,OsmPrimitive> map = new HashMap<OsmPrimitive,OsmPrimitive>(); 65 65 /* temporarily maps old nodes to new so we can do a true deep copy */ 66 66 67 67 /* do the deep copy of the paste buffer contents, leaving the pasteBuffer unchanged */ … … 69 69 Node nnew = new Node(n); 70 70 nnew.id = 0; 71 if (Main.ma in.createOrGetEditLayer() == source) {71 if (Main.map.mapView.getEditLayer() == source) { 72 72 nnew.setEastNorth(nnew.getEastNorth().add(offsetEast, offsetNorth)); 73 73 } … … 113 113 114 114 Main.main.undoRedo.add(new SequenceCommand(tr("Paste"), clist)); 115 Main.ds.setSelected(osms);115 getCurrentDataSet().setSelected(osms); 116 116 Main.map.mapView.repaint(); 117 117 }
Note:
See TracChangeset
for help on using the changeset viewer.