diff options
author | Julian Eisel <julian@blender.org> | 2020-08-03 18:18:15 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-08-03 19:26:06 +0300 |
commit | 10590b0500c95d124d00f95e5eefbc7107e3ba5e (patch) | |
tree | 5e31d644e61db9f832ed9bd62b27248799965c96 /release/scripts/startup/bl_ui/space_graph.py | |
parent | 3593dff147ae2a13c07e6338cb0d6a71218596b1 (diff) |
Fix missing shortcut indicators and crash on shortcut change
Fixes T78346.
The shortcut display and change code is context sensitive. To make it
work correctly the context needs to be set properly.
When executing operators from the dropdowns, the active region is the
header, but the shortcut handlers are set for the main region. So make
sure that is used instead.
This also sets the main region active for context menu operators, where
this issue shouldn't be present. Doing it anyway shouldn't hurt though
and fixes this issue in case somebody displays the context menu in the
header as dropdown too.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_graph.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index c251d55714f..078b1c9ff38 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -293,7 +293,7 @@ class GRAPH_MT_key(Menu): # Using the modal operation doesn't make sense for this variant # as we do not have a modal mode for it, so just execute it. - layout.operator_context = 'EXEC_DEFAULT' + layout.operator_context = 'EXEC_REGION_WIN' layout.operator("graph.decimate", text="Decimate (Allowed Change)").mode = 'ERROR' layout.operator_context = operator_context |