- Timestamp:
- 2011-06-16T16:26:37+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Way.java
r4100 r4138 532 532 return super.isDrawable() && !hasIncompleteNodes(); 533 533 } 534 535 536 /* since revision 4138 */ 537 public double getLength() { 538 double length = 0; 539 Node lastN = null; 540 for (Node n:nodes) { 541 if(lastN != null) 542 length += n.getCoor().greatCircleDistance(lastN.getCoor()); 543 lastN = n; 544 } 545 return length; 546 } 534 547 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/SelectionListDialog.java
r4113 r4138 624 624 fireContentsChanged(this, 0, getSize()); 625 625 remember(selection); 626 double dist = -1; 627 if(this.selection.size() == 1) { 628 OsmPrimitive o = this.selection.get(0); 629 if(o instanceof Way) 630 dist = ((Way)o).getLength(); 631 } 632 Main.map.statusLine.setDist(dist); 626 633 } 627 634
Note:
See TracChangeset
for help on using the changeset viewer.