State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.0v1|BugID:332478|
Problem summary:
If multiple Hydra viewer manipulators attempt to use the same keyboard shortcut (including no shortcut at all), an exception is raised that stops the Hydra Viewer tab from being initialized.
Test 1
keyboardShortcutManager = UI4.App.KeyboardShortcutManagerkeyboardShortcutManager.RegisterKeyEvent( "HydraViewerTab", "this_is_supposed_to_an_unique_id", "Turn Heating On", "H") Test 2
Expected behaviour:
Manipulators with clashing shortcuts should still appear in the menu, but not be activated by a keyboard shortcut. Also the hydra viewer shouldn't crash.
Actual behaviour:
The following exception is raised and the Hydra Viewer tab fails to load.
Error creating "Viewer (Hydra)" tab: KeyError: 'f07372a4dd26c0b0311f8bf0cfad298c' UI4.App.Tabs 2018-02-07T12:41:45Traceback (most recent call last): File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist/bin/python\UI4\App\Tabs.py", line 427, in CreateTab widget = plugin.data(parent) File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist/bin/python\UI4\App\KeyboardShortcutManager\KeyboardShortcutManagerMixin.py", line 75, in __call__ result = type.__call__(self, *args, **kwargs) File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist\bin\python\UI4\Tabs\HydraViewer\HydraViewerTab.py", line 208, in __init__ self.__viewerDelegate) File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist\bin\python\UI4\Tabs\HydraViewer\ManipulatorManager.py", line 299, in __init__ self.__initializeManipulators() File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist\bin\python\UI4\Tabs\HydraViewer\ManipulatorManager.py", line 605, in __initializeManipulators lambda tab, manipulatorName=manipulatorName: File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist/bin/python\UI4\App\KeyboardShortcutManager\KeyboardShortcutManagerMixin.py", line 177, in registerKeyboardShortcut keyReleaseCallback) File "C:\workspace\excalibur\Apps\Katana\objects\win-64-x86-Debug-14.0.24210-dynamic\Dist/bin/python\UI4\App\KeyboardShortcutManager\KeyboardShortcutManager.py", line 307, in RegisterKeyEvent __keyEvents[keyEventID]["name"])KeyError: 'f07372a4dd26c0b0311f8bf0cfad298c' Workaround:
Ensure all manipulators have a unique keyboard shortcut.
Reproduced versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why