Modify

Opened 9 years ago

Closed 9 years ago

#12417 closed defect (fixed)

[patch] mapmodes did not listen to preferences change

Reported by: kolesar Owned by: team
Priority: normal Milestone: 16.02
Component: Core Version:
Keywords: Cc:

Description

Some mapmodes cached preferences by their readPreferences() method and did not refresh them later. Some of them called this method on entering mode but it is not enough. When a user changes a setting of a tool it is usually active already. Therefore mapmodes should update their cached preferences on preference change.

I have modified MapMode to be PreferenceChangedListener. Also modified readPreferences() method in the affected mapmodes from private to protected for overriding.

Splinex plugin was also affected, attached a separate patchfile.

Attachments (3)

MapModePreferenceChangedListener.patch (5.0 KB ) - added by kolesar 9 years ago.
SplinexMapModeOverride.patch (1.0 KB ) - added by kolesar 9 years ago.
MapModePreferenceChangedListener.2.patch (5.1 KB ) - added by kolesar 9 years ago.

Download all attachments as: .zip

Change History (8)

by kolesar, 9 years ago

comment:1 by bastiK, 9 years ago

The inactive mapmodes need not be on alert all the time. Why not register PreferenceChangedListener & fire readPreferences on enterMode and unregister on exitMode?

comment:2 by kolesar, 9 years ago

Great idea, thanks. I will update patch soon.

comment:3 by kolesar, 9 years ago

Attached new patch.

Last edited 9 years ago by kolesar (previous) (diff)

comment:4 by Don-vip, 9 years ago

Milestone: 16.02

comment:5 by Don-vip, 9 years ago

Resolution: fixed
Status: newclosed

In 9572/josm:

fix #12417 - mapmodes did not listen to preferences change (patch by kolesar)

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.