Changeset 24946 in osm for applications/editors


Ignore:
Timestamp:
2011-01-02T14:11:44+01:00 (14 years ago)
Author:
oliverw
Message:

Bugfix: Check bounding box before zoom.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/FixAddresses/src/org/openstreetmap/josm/plugins/fixAddresses/OsmUtils.java

    r24942 r24946  
    214214                CheckParameterUtil.ensureParameterNotNull(addressList, "addressList");
    215215               
    216                 if (Main.map == null && Main.map.mapView == null) return; // nothing to do
     216                if (Main.map == null && Main.map.mapView == null) return;       // nothing to do
     217                if (addressList.size() == 0) return;                                            // dto.
    217218                       
    218219                // compute bounding box
     
    224225        }
    225226       
    226         // zoom to calculated bounding box       
    227         Main.map.mapView.zoomTo(bbox.getBounds());
     227        if (bbox.getBounds() != null) {
     228                //      zoom to calculated bounding box       
     229                Main.map.mapView.zoomTo(bbox.getBounds());
     230        }
    228231        }
    229232
Note: See TracChangeset for help on using the changeset viewer.