Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#21443 closed defect (fixed)

[PATCH] Mapillary Filter edits simultaneously interpreted as JOSM hotkey

Reported by: Polarbear-j Owned by: taylor.smock
Priority: normal Milestone:
Component: Plugin mapillary Version: latest
Keywords: hotkeys Cc: Don-vip

Description

'Mapillary' (version 2.0.0-alpha.37)
Identification: JOSM/1.5 (18275 en_GB) Mac OS X 10.14.6

When entering a number in the mapillary filter pane, e.g. to filter for images not older than '1' or '2' images, the number is simultaneously interpreted by main JOSM as hotkey, which are typically linked to major zoom actions.

Screenshots from the zoom menu and mapillary pane.

Attachments (4)

Screenshot 2021-10-16 at 20.26.04.png (43.9 KB ) - added by Polarbear-j 3 years ago.
Screenshot 2021-10-16 at 18.26.40.png (547.0 KB ) - added by Polarbear-j 3 years ago.
21443.patch (13.3 KB ) - added by taylor.smock 3 years ago.
Extract shortcut disablement to interface, with default implementations for focusGained/focusLost
21443.2.patch (11.9 KB ) - added by taylor.smock 3 years ago.
Drop @PrivateMethod annotation

Download all attachments as: .zip

Change History (12)

by Polarbear-j, 3 years ago

by Polarbear-j, 3 years ago

comment:1 by taylor.smock, 3 years ago

Related: #20954

I'll see if I can copy the code over, or maybe (in JOSM core), make it an interface so we don't have to extend a specific class.

by taylor.smock, 3 years ago

Attachment: 21443.patch added

Extract shortcut disablement to interface, with default implementations for focusGained/focusLost

comment:2 by taylor.smock, 3 years ago

Cc: Don-vip added
Summary: Mapillary Filter edits simultaneously interpreted as JOSM hotkey[WIP PATCH] Mapillary Filter edits simultaneously interpreted as JOSM hotkey

@Don-vip: What do you think about moving the shortcut disable/enable code into an interface?

  • Pros: We don't have to extend a text field class.
  • Cons: The methods are public (Java 9 allows for private methods in interfaces, Java 8 does not)

comment:3 by Don-vip, 3 years ago

if it's the only con, no problem. We have public methods far more dangerous than this :D

in reply to:  3 comment:4 by taylor.smock, 3 years ago

Summary: [WIP PATCH] Mapillary Filter edits simultaneously interpreted as JOSM hotkey[PATCH] Mapillary Filter edits simultaneously interpreted as JOSM hotkey

Replying to Don-vip:

if it's the only con, no problem. We have public methods far more dangerous than this :D

OK. I added a @PrivateMethod annotation in attachment:21443.patch (just as a hint to users that they shouldn't expect the methods to remain public). I'll go ahead and drop it.

by taylor.smock, 3 years ago

Attachment: 21443.2.patch added

Drop @PrivateMethod annotation

comment:5 by taylor.smock, 3 years ago

Component: Plugin mapillaryCore
Owner: changed from taylor.smock to team

Moving to Core since that is what the attached patch modifies. I'll have to do some stuff in the Mapillary plugin to actually fix the problem.

EDIT: Mapillary plugin fixed here: https://gitlab.com/smocktaylor/Mapillary/-/merge_requests/173/diffs?commit_id=8ac7594685504e2939239de3732363cb0e4b8c95 . I just need to bump JOSM to the appropriate version and merge it in.

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:6 by Don-vip, 3 years ago

In 18285/josm:

see #21443 - Extract shortcut disablement to interface, with default implementations for focusGained/focusLost (patch by taylor.smock)

comment:7 by Don-vip, 3 years ago

Component: CorePlugin mapillary
Owner: changed from team to taylor.smock

Patch applied. A new latest is being built right now.

in reply to:  7 comment:8 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

Replying to Don-vip:

Patch applied. A new latest is being built right now.

Thanks. As soon as the pipeline finishes, I'll do a new release of the Mapillary plugin (so 30 minutes to 1 hour probably).

EDIT:
See https://josm.openstreetmap.de/wiki/PluginsSource?action=diff&version=680

Last edited 3 years ago by taylor.smock (previous) (diff)

Modify Ticket

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