#8547 closed defect (fixed)
Wrong Lenght of way (minus 1) is displayed in status line
| Reported by: | Chris66 | Owned by: | Don-vip |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | length status line | Cc: |
Description
In the status line a wrong length of the selected way is displayed.
Example: During drawing 10m becomes 9m after finishing the line (double click).
Attachments (0)
Change History (8)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
org.openstreetmap.josm.gui.dialogs.SelectionListDialog:
public void setJOSMSelection
double dist = -1;
[...]
dist += w.getLength();
Main.map.statusLine.setDist(dist);
seems a bit odd here. This will likely cause the difference of one.
comment:3 by , 13 years ago
comment:4 by , 13 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:6 by , 13 years ago
If no way is selected, then dist should be < 0.
Maybe:
double dist = -1;
[...]
if (!ways.isEmpty() && ways.size() <= maxWays) {
dist = 0.0;
for (Way w : ways) {
dist += w.getLength();
}
}
Main.map.statusLine.setDist(dist);



Tested on Win7 and Ubuntu 12.04.