From e46b87f4b1a905667810b5e5e543a466c93edca3 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Thu, 31 Aug 2023 14:59:21 +0200 Subject: [PATCH] Node Editor: show auto-attach status while moving This was just giving the shortcut to toggle, but not giving the actual status ("ON"/"OFF"). This was especially confusing in the following scenario: - Alt-drag a node (to detach links) - try to drop on a link (with Alt still held down) was not working because the modal keymap would have actually toggled auto-attach to OFF Pull Request: https://projects.blender.org/blender/blender/pulls/111739 --- .../blender/editors/transform/transform_mode_translate.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/transform/transform_mode_translate.cc b/source/blender/editors/transform/transform_mode_translate.cc index 3491f50808a..fe9b06f7d69 100644 --- a/source/blender/editors/transform/transform_mode_translate.cc +++ b/source/blender/editors/transform/transform_mode_translate.cc @@ -316,8 +316,11 @@ static void headerTranslation(TransInfo *t, const float vec[3], char str[UI_MAX_ char str_attach_km[64]; WM_modalkeymap_items_to_string( t->keymap, TFM_MODAL_NODE_ATTACH_OFF, true, str_attach_km, sizeof(str_attach_km)); - ofs += BLI_snprintf_rlen( - str + ofs, UI_MAX_DRAW_STR - ofs, TIP_(", %s: Toggle auto-attach"), str_attach_km); + ofs += BLI_snprintf_rlen(str + ofs, + UI_MAX_DRAW_STR - ofs, + TIP_(", %s: Toggle auto-attach (%s)"), + str_attach_km, + WM_bool_as_string((t->modifiers & MOD_NODE_ATTACH) != 0)); } else { if (t->flag & T_2D_EDIT) {