Changeset 1039 in josm for trunk


Ignore:
Timestamp:
2008-10-13T11:02:44+02:00 (16 years ago)
Author:
stoecker
Message:

cleanup prefs access a bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java

    r1038 r1039  
    148148
    149149        private void updateSizeCheck() {
    150                 double squareDegrees = (maxlon-minlon)*(maxlat-minlat);
    151                 double maxBboxSize = 0.25;
    152                 try {
    153                         Double.parseDouble(Main.pref.get("osm-server.max-request-area", "0.25"));
    154                 } catch (NumberFormatException nfe) {
    155                         maxBboxSize = 0.25;
    156                 }
    157                 if (squareDegrees > maxBboxSize) {
     150                if ((maxlon-minlon)*(maxlat-minlat) > Main.pref.getDouble("osm-server.max-request-area", 0.25)) {
    158151                        sizeCheck.setText(tr("Download area too large; will probably be rejected by server"));
    159152                        sizeCheck.setForeground(Color.red);
Note: See TracChangeset for help on using the changeset viewer.