Changeset 5713 in josm
- Timestamp:
- 2013-02-12T23:31:18+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r5360 r5713 74 74 import org.openstreetmap.josm.tools.InputMapUtils; 75 75 import org.openstreetmap.josm.tools.Shortcut; 76 import org.openstreetmap.josm.tools.SubclassFilteredCollection; 76 77 77 78 /** … … 590 591 remember(selection); 591 592 double dist = -1; 592 if(this.selection.size() == 1) { 593 OsmPrimitive o = this.selection.get(0); 594 if(o instanceof Way) 595 dist = ((Way)o).getLength(); 593 SubclassFilteredCollection<OsmPrimitive, Way> ways = new SubclassFilteredCollection<OsmPrimitive, Way>(selection, OsmPrimitive.wayPredicate); 594 // Compute total length of selected way(s) until an arbitrary limit set to 250 ways 595 // in order to prevent performance issue if a large number of ways are selected (old behaviour kept in that case, see #8403) 596 if (!ways.isEmpty() && ways.size() < 250) { 597 for (Way w : ways) { 598 dist += w.getLength(); 599 } 596 600 } 597 601 Main.map.statusLine.setDist(dist);
Note:
See TracChangeset
for help on using the changeset viewer.