Ignore:
Timestamp:
2014-03-26T02:15:38+01:00 (6 years ago)
Author:
Don-vip
Message:

fix #7423 - Align nodes in circle results are unstable (patch by Balaitous)

File:
1 edited

Legend:

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

    r6933 r6934  
    217217
    218218        if (center == null) {
    219             // Compute the centroid of nodes
    220             center = Geometry.getCentroid(nodes);
    221         }
    222         // Node "center" now is central to all selected nodes.
     219            // Compute the center of nodes
     220            center = Geometry.getCenter(nodes);
     221            if (center == null) {
     222                new Notification(tr("Cannot determine center of selected nodes."))
     223                    .setIcon(JOptionPane.INFORMATION_MESSAGE)
     224                    .setDuration(Notification.TIME_SHORT)
     225                    .show();
     226                return;
     227            }
     228        }
    223229   
    224230        // Now calculate the average distance to each node from the
Note: See TracChangeset for help on using the changeset viewer.