diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-18 00:25:53 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-08-18 15:39:45 +0300 |
commit | 7bffafab7b2a489c9f0eafd576f9da0cbc1a5081 (patch) | |
tree | 08588f5165789da61292ee357fb1478f7a7bd440 /source/blender/editors/space_view3d/view3d_select.c | |
parent | c0f600cad1d2d107d189b15b12e2fcc6bba0985c (diff) |
Fix T90718: Object selection toggle do not work inside edit mode
The object was not deselected as it was expected that it would be
activated.
But this activation does not happen in edit mode.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 2ce5684e874..e3f97dd1c63 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2521,6 +2521,7 @@ static bool ed_object_select_pick(bContext *C, } /* also prevent making it active on mouse selection */ else if (BASE_SELECTABLE(v3d, basact)) { + const bool use_activate_selected_base = (oldbasact != basact) && (is_obedit == false); if (extend) { ED_object_base_select(basact, BA_SELECT); } @@ -2529,7 +2530,8 @@ static bool ed_object_select_pick(bContext *C, } else if (toggle) { if (basact->flag & BASE_SELECTED) { - if (basact == oldbasact) { + /* Keep selected if the base is to be activated. */ + if (use_activate_selected_base == false) { ED_object_base_select(basact, BA_DESELECT); } } @@ -2545,7 +2547,7 @@ static bool ed_object_select_pick(bContext *C, } } - if ((oldbasact != basact) && (is_obedit == false)) { + if (use_activate_selected_base) { ED_object_base_activate(C, basact); /* adds notifier */ if ((scene->toolsettings->object_flag & SCE_OBJECT_MODE_LOCK) == 0) { WM_toolsystem_update_from_context_view3d(C); |