Modify

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#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 Chris66, 13 years ago

Tested on Win7 and Ubuntu 12.04.

comment:2 by anonymous, 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:4 by Don-vip, 13 years ago

Owner: changed from team to Don-vip
Status: newassigned

comment:5 by Don-vip, 13 years ago

Resolution: fixed
Status: assignedclosed

In 5805/josm:

fix #8547 - Wrong length of way (minus 1) displayed in status line

comment:6 by anonymous, 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);

comment:7 by Don-vip, 13 years ago

woops, yes. sorry

comment:8 by Don-vip, 13 years ago

In 5806/josm:

fix #8547 for good

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.