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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-06 15:43:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-06 16:06:45 +0300
commitcda20a7af89c7da76a5016667f24f06eaa8afdb1 (patch)
tree0dcafafdaba7b6abeeb086098868326ff90497cb
parent539575b585a018eabda9137d724967692433165a (diff)
Keymap: ignore the fallback keymap when "Active Tool" is set
Resolve regression in c9d9bfa84ad5cb985e3feccffa702b2f3cc2adf8, which added support for tools to be tagged as using a fallback too. In these cases the "Active Tool" setting was ignored and the fallback tool would be used (the spin tool would box select for example).
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index b4abc4f2fde..a2625f233b5 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -4025,6 +4025,7 @@ void WM_event_get_keymap_from_toolsystem_fallback(wmWindowManager *wm,
const char *keymap_id_list[ARRAY_SIZE(km_result->keymaps)];
int keymap_id_list_len = 0;
+ const Scene *scene = wm->winactive->scene;
ScrArea *area = handler->dynamic.user_data;
handler->keymap_tool = NULL;
bToolRef_Runtime *tref_rt = area->runtime.tool ? area->runtime.tool->runtime : NULL;
@@ -4036,7 +4037,8 @@ void WM_event_get_keymap_from_toolsystem_fallback(wmWindowManager *wm,
bool is_gizmo_visible = false;
bool is_gizmo_highlight = false;
- if (tref_rt && tref_rt->keymap_fallback[0]) {
+ if ((tref_rt && tref_rt->keymap_fallback[0]) &&
+ (scene->toolsettings->workspace_tool_type == SCE_WORKSPACE_TOOL_FALLBACK)) {
bool add_keymap = false;
/* Support for the gizmo owning the tool keymap. */