| Summary: | Navigationtree is broken after keyboard shortcut is used | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Riena | Reporter: | Steffen Kriese <steffen.kriese> | ||||||
| Component: | UI | Assignee: | Elias Volanakis <elias> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | christian.campo, elias | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 2.0.0.RC4 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Steffen Kriese
If has added to keyboard shortcuts to the SWT Example Client of Riena. So this bug is also reproducible with the Riena Example. The command Zoom In and Zoom Out have the shortcuts CTRL+I and CTRL+O. After using one of this shortcuts a message box is displayed and no selection in the sub-module tree of the current module activates another sub-module. If use select these menu items with the mouse, everything works fine. I also tested the shortcuts F8 and F9. This works fine. Shortcut SHIFT+ALT+I doesn't work. I've identified the problem in ModuleNavigationListener. Basically keyReleased() is not called after keyPressed() - if another dialog (shell) is opened because of the key combination.
Since Ctrl+I opens a new dialog (Shell) the keyReleased(...) method is never called, and the result is that keyPressed is left set to true (would be false after keyReleased). Because of that clicks are ignored until the next key press (which resets keyReleased)
Normal run:
[user presses key]
keyPressed() { keyPressed = true }
[user releases key]
keyReleased() { keyPressed = false }
Ctrl+I:
[Ctrl+I]
keyPressed()
Dialog opens
[user releases key]
Will prepare a patch next...
Created attachment 170888 [details]
patch
@Christian: please review attached patch.
This should be commited to HEAD and release branches.
Created attachment 171009 [details]
Updated patch
Addresses the issue of clicking in the the tree when a key (example shift) is pressed.
The submodule will be activated when releasing the key (if desired this could be done differently - for example when releasing the mouse button - however this way only the most minimal change is needed)
patch looks good, thanks elias. fixed in HEAD and release branch |