Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-08-03 18:18:15 +0300
committerJulian Eisel <julian@blender.org>2020-08-03 19:26:06 +0300
commit10590b0500c95d124d00f95e5eefbc7107e3ba5e (patch)
tree5e31d644e61db9f832ed9bd62b27248799965c96 /release/scripts/startup/bl_ui/space_graph.py
parent3593dff147ae2a13c07e6338cb0d6a71218596b1 (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.py2
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