Changeset 1160 in josm for trunk/src


Ignore:
Timestamp:
2008-12-22T17:49:36+01:00 (11 years ago)
Author:
stoecker
Message:

fixed NPE with Lambert projection

File:
1 edited

Legend:

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

    r1090 r1160  
    187187        if (center == null) {
    188188            center = new Node(new LatLon(0, 0));
    189             Node n0, n1, n2, prvni, druhy;
    190             n0 = (Node) nodes.toArray()[nodes.size() - 1];
    191             n1 = (Node) nodes.toArray()[nodes.size() - 2];
     189            center.eastNorth = new EastNorth(0, 0); // to be independent of projection
     190            Node n0 = (Node) nodes.toArray()[nodes.size() - 1];
     191            Node n1 = (Node) nodes.toArray()[nodes.size() - 2];
     192            Node n2;
    192193            for (Node n : nodes) {
    193194                n2 = n1;
Note: See TracChangeset for help on using the changeset viewer.