Fix hotkeys for Multi images (Compound files)#1561
Conversation
|
|
||
| this.setupHotkeys(this.hotkeyListenerScope) | ||
|
|
||
| if ( this.is_active ) { |
There was a problem hiding this comment.
Once image annotation components are mounted, need to activate registered hotkeys ofr the active one.
| } | ||
| if ( this.is_active) { | ||
| this.hotkey_listener.setScopes([this.hotkeyListenerScope]) | ||
| } else { |
There was a problem hiding this comment.
The else block is needed for situations when user annotates in the compound context. For example text_annotation component currently uses a different mechanism for registering hotkeys. If user switches from image annotation to text in the same compound context, we needs to deactivate image annotation hotkeys.
|
Hey Anthony, I'm not removing old hotkey manager class because it looks like it's still used by text_annotation_core component. Please see |
|
Makes sense regarding keeping legacy Tested manually and appears all working as expected now, thanks Sergey! |
|
One small note for future is when we do remove legacy (Edit: That's my interpretation and agreement of your idea (re: thin leaf nodes) from prior call) |
Description
Fix a bug with hotkeys that happens in compound file context with multiple images. Updated HotkeyListener documentation to make it easier to use.
Bug Description:
Pressing a hotkey makes registered hotkey callbacks fire for all the image annotation panes