Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12275 closed enhancement (fixed)

[patch] Option for two decimal places in status line

Reported by: ar2988-os@… 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 ar2988-os@… 3 years ago.

Download all attachments as: .zip

Change History (14)

Changed 3 years ago by ar2988-os@…

Attachment: diff.txt added

comment:1 Changed 3 years ago by mdk

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

comment:2 Changed 3 years ago by simon04

Milestone: 16.01

comment:3 Changed 3 years ago by simon04

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 Changed 3 years ago by ar2988-os@…

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 Changed 3 years ago by simon04

In 9272/josm:

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

comment:6 in reply to:  4 Changed 3 years ago by simon04

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.

comment:7 in reply to:  5 Changed 3 years ago by ar2988-os@…

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

comment:8 Changed 3 years ago by stoecker

Hmm. Isn't -180 longer than 360?

comment:9 Changed 3 years ago by simon04

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 Changed 3 years ago by Klumbumbus

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

comment:11 in reply to:  10 ; Changed 3 years ago by simon04

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.

comment:12 in reply to:  11 Changed 3 years ago by Klumbumbus

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 Changed 3 years ago by simon04

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.