Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 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 Changed 7 years ago by Chris66

Tested on Win7 and Ubuntu 12.04.

comment:2 Changed 7 years ago by anonymous

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 Changed 7 years ago by Don-vip

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

comment:5 Changed 7 years ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 5805/josm:

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

comment:6 Changed 7 years ago by anonymous

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 Changed 7 years ago by Don-vip

woops, yes. sorry

comment:8 Changed 7 years ago by Don-vip

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.