Changeset 8670 in josm for trunk/src


Ignore:
Timestamp:
2015-08-17T19:13:17+02:00 (9 years ago)
Author:
simon04
Message:

fix #11749 - Jump to Position: add D M S and D M.M coordinate support to

File:
1 edited

Legend:

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

    r8513 r8670  
    2222import org.openstreetmap.josm.gui.MapFrameListener;
    2323import org.openstreetmap.josm.gui.MapView;
     24import org.openstreetmap.josm.gui.dialogs.LatLonDialog;
    2425import org.openstreetmap.josm.gui.widgets.JosmTextField;
    2526import org.openstreetmap.josm.tools.GBC;
     
    150151                ll = new LatLon(Double.parseDouble(lat.getText()), Double.parseDouble(lon.getText()));
    151152            } catch (NumberFormatException ex) {
    152                 JOptionPane.showMessageDialog(Main.parent,
    153                         tr("Could not parse Latitude, Longitude or Zoom. Please check."),
    154                         tr("Unable to parse Lon/Lat"), JOptionPane.ERROR_MESSAGE);
     153                try {
     154                    ll = LatLonDialog.parseLatLon(lat.getText() + "; " + lon.getText());
     155                } catch (IllegalArgumentException ex2) {
     156                    JOptionPane.showMessageDialog(Main.parent,
     157                            tr("Could not parse Latitude, Longitude or Zoom. Please check."),
     158                            tr("Unable to parse Lon/Lat"), JOptionPane.ERROR_MESSAGE);
     159                }
    155160            }
    156161        }
Note: See TracChangeset for help on using the changeset viewer.