Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12275 closed enhancement (fixed)

[patch] Option for two decimal places in status line

Reported by: Adrian Owned by: team
Priority: normal Milestone: 16.01
Component: Core Version: latest
Keywords: Cc:

Description

Sometimes I find it useful to have two decimal places for the heading, the angle and the length in the status line. To obtain this, I have been building custom versions of JOSM, with the attached diff applied to src/org/openstreetmap/josm/gui/MapStatus.java This gives two decimal places all the time. I propose an enhancement where there would be a preference in expert mode, allowing to choose one decimal place or two decimal places (default: one). But I do not have the programming skill to code this.

Attachments (1)

diff.txt (1.2 KB ) - added by Adrian 8 years ago.

Download all attachments as: .zip

Change History (14)

by Adrian, 8 years ago

Attachment: diff.txt added

comment:1 by mdk, 8 years ago

Summary: Option for two decimal places in status line[patch] Option for two decimal places in status line

comment:2 by simon04, 8 years ago

Milestone: 16.01

comment:3 by simon04, 8 years ago

Resolution: fixed
Status: newclosed

In 9269/josm:

fix #12275 - Allow changing decimal places in status line

Use expert preference keys statusbar.decimal-format and statusbar.distance-threshold for that,
and restart JOSM.

comment:4 by Adrian, 8 years ago

Thank you.
I have built r9269 and there are some problems.

  1. It hangs at 100% CPU when attempting to open a large file.
  2. The preferences dialog does not give a warning that JOSM must be restarted for some of the preference changes to take effect.
  3. The angle fields in the status bar are too narrow to display the second decimal place when the angle is greater than 100 degrees. This was the reason for the second and third changes in my diff.

comment:5 by simon04, 8 years ago

In 9272/josm:

see #12275 - Provide space depending on decimal places in status line

in reply to:  4 comment:6 by simon04, 8 years ago

Replying to ar2988-os@…:

I have built r9269 and there are some problems.

  1. It hangs at 100% CPU when attempting to open a large file.

This should be unrelated to these changes. Try obtaining another build (e.g., from jenkins) and create a separate ticket if the problem persists.

  1. The preferences dialog does not give a warning that JOSM must be restarted for some of the preference changes to take effect.

We do not provide any comfort for such hidden and super-expert options, sorry.

  1. The angle fields in the status bar are too narrow to display the second decimal place when the angle is greater than 100 degrees. This was the reason for the second and third changes in my diff.

I overlooked that (in the unusual, un-highlighted diff format). Addressed in r9272.

in reply to:  5 comment:7 by Adrian, 8 years ago

Replying to simon04:
r9272 does indeed fix item 3, thank you.

comment:8 by stoecker, 8 years ago

Hmm. Isn't -180 longer than 360?

comment:9 by simon04, 8 years ago

The displayed values range from 0 to 360. And since 6 chars before my modification were just fine for 360.0 ° (7 chars), I adapted to this magic calculation. :)

comment:10 by Klumbumbus, 8 years ago

This feature does not work for me. What should statusbar.decimal-format and statusbar.distance-threshold be to see two decimal places?

in reply to:  10 ; comment:11 by simon04, 8 years ago

Replying to Klumbumbus:

This feature does not work for me. What should statusbar.decimal-format and statusbar.distance-threshold be to see two decimal places?

Set statusbar.decimal-format to 0.00 and restart JOSM. statusbar.distance-threshold determines when to display -- instead of the distance.

in reply to:  11 comment:12 by Klumbumbus, 8 years ago

Replying to simon04:

Set statusbar.decimal-format to 0.00 and restart JOSM.

This doesn't work for me. I created a new ticket: #12563

comment:13 by simon04, 8 years ago

In 9863/josm:

see #12275 - Clarify variable name

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.