Fix T72416: Tool settings ignored when activated from gizmo
This commit is contained in:
@@ -109,6 +109,8 @@ static wmGizmo *tool_generic_create_gizmo(const bContext *C, wmGizmoGroup *gzgro
|
||||
RNA_float_set(gz->ptr, "backdrop_fill_alpha", 0.125f);
|
||||
}
|
||||
|
||||
gz->flag |= WM_GIZMO_OPERATOR_TOOL_INIT;
|
||||
|
||||
bToolRef *tref = WM_toolsystem_ref_from_context((bContext *)C);
|
||||
wmWindowManager *wm = CTX_wm_manager(C);
|
||||
struct wmKeyConfig *kc = wm->defaultconf;
|
||||
|
||||
@@ -2265,9 +2265,18 @@ static int wm_handler_operator_call(bContext *C,
|
||||
bool use_last_properties = true;
|
||||
PointerRNA tool_properties = {0};
|
||||
|
||||
bToolRef *keymap_tool = ((handler_base->type == WM_HANDLER_TYPE_KEYMAP) ?
|
||||
((wmEventHandler_Keymap *)handler_base)->keymap_tool :
|
||||
NULL);
|
||||
bToolRef *keymap_tool = NULL;
|
||||
if (handler_base->type == WM_HANDLER_TYPE_KEYMAP) {
|
||||
keymap_tool = ((wmEventHandler_Keymap *)handler_base)->keymap_tool;
|
||||
}
|
||||
else if (handler_base->type == WM_HANDLER_TYPE_GIZMO) {
|
||||
wmGizmoMap *gizmo_map = ((wmEventHandler_Gizmo *)handler_base)->gizmo_map;
|
||||
wmGizmo *gz = wm_gizmomap_highlight_get(gizmo_map);
|
||||
if (gz && (gz->flag & WM_GIZMO_OPERATOR_TOOL_INIT)) {
|
||||
keymap_tool = WM_toolsystem_ref_from_context(C);
|
||||
}
|
||||
}
|
||||
|
||||
const bool is_tool = (keymap_tool != NULL);
|
||||
const bool use_tool_properties = is_tool;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user