JOSM / areaselector

JOSM Area Selection Plugin
https://github.com/JOSM/JOSM-areaselector/wiki
18 stars 3 forks source link

Fix JOSM #21902: IAE: Listener was not registered before #49

Closed tsmock closed 2 years ago

tsmock commented 2 years ago

This is caused by (a) sharing an action between a menu and (b) a mapframe icon.

This adds a non-regression test, and additionally modifies the AreaSelectorAction to override readPreferences, which is called when the map mode is entered. Furthermore, the MapMode class implements PreferenceChangedListener, which removes the need to notify the action manually about modified preferences.

Signed-off-by: Taylor Smock tsmock@fb.com