Changeset 4314 in josm for trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
- Timestamp:
- 13.08.2011 11:00:41 (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
r4191 r4314 10 10 import org.openstreetmap.josm.Main; 11 11 import org.openstreetmap.josm.command.AddCommand; 12 import org.openstreetmap.josm.data.coor.EastNorth; 12 13 import org.openstreetmap.josm.data.coor.LatLon; 13 14 import org.openstreetmap.josm.data.osm.Node; … … 21 22 public final class AddNodeAction extends JosmAction { 22 23 // remember input from last time 23 private String text ;24 private String textLatLon, textEastNorth; 24 25 25 26 public AddNodeAction() { 26 super(tr("Add Node..."), "addnode", tr("Add a node by entering latitude and longitude."),27 super(tr("Add Node..."), "addnode", tr("Add a node by entering latitude / longitude or easting / northing."), 27 28 Shortcut.registerShortcut("addnode", tr("Edit: {0}", tr("Add Node...")), KeyEvent.VK_D, Shortcut.GROUP_EDIT, 28 29 Shortcut.SHIFT_DEFAULT), true); … … 36 37 LatLonDialog dialog = new LatLonDialog(Main.parent, tr("Add Node..."), ht("/Action/AddNode")); 37 38 38 if (text != null) { 39 dialog.setText(text); 39 if (textLatLon != null) { 40 dialog.setLatLonText(textLatLon); 41 } 42 if (textEastNorth != null) { 43 dialog.setEastNorthText(textEastNorth); 40 44 } 41 45 42 dialog.setVisible(true); 43 if (dialog.isCanceled()) 46 dialog.showDialog(); 47 48 if (dialog.getValue() != 1) 44 49 return; 45 50 … … 48 53 return; 49 54 50 text = dialog.getText(); 55 textLatLon = dialog.getLatLonText(); 56 textEastNorth = dialog.getEastNorthText(); 51 57 52 58 Node nnew = new Node(coordinates);
Note: See TracChangeset
for help on using the changeset viewer.
