From 2240ca3e7bbf07c1d417f288af3ab3fa2ef68df9 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 24 Oct 2022 10:34:54 +0200 Subject: Fix T101933: pick deselecting bones in empty space deactivates armature As a consequence of this, subsequent box-selection of bones would not show correctly in Animation Editors (not showing the channels there because of the lack of an active object). The bug was caused by rBba6d59a85a38. Prior to said commit, code logic was relying on the check for `basact` being NULL to determine if object selection changes need to happen. After that commit, this was handled by a `handled` variable, but this was not set correctly if `basact` is actually NULL after the initial pick (aka deselection by picking). Maniphest Tasks: T101933 Differential Revision: https://developer.blender.org/D16326 --- source/blender/editors/space_view3d/view3d_select.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_view3d/view3d_select.cc b/source/blender/editors/space_view3d/view3d_select.cc index cba85097071..2a84d61c561 100644 --- a/source/blender/editors/space_view3d/view3d_select.cc +++ b/source/blender/editors/space_view3d/view3d_select.cc @@ -2704,7 +2704,10 @@ static bool ed_object_select_pick(bContext *C, /* When there is no `baseact` this will have operated on `oldbasact`, * allowing #SelectPick_Params.deselect_all work in pose-mode. * In this case no object operations are needed. */ - if (basact != nullptr) { + if (basact == nullptr) { + handled = true; + } + else { /* By convention the armature-object is selected when in pose-mode. * While leaving it unselected will work, leaving pose-mode would leave the object * active + unselected which isn't ideal when performing other actions on the object. */ -- cgit v1.2.3