diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-15 18:44:50 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-15 18:44:50 +0300 |
commit | 0b5b543b7cec64d545ec770e1a70409560e39d56 (patch) | |
tree | 56240414626c00a25526bb3707559812448926f0 /source | |
parent | 38e08ec66bb4d05d530cc57f1a9a7c79470000b0 (diff) |
Fix pose mode border deselect not working after recent changes.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index f91876a01bd..1df3aecb8d8 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2345,17 +2345,23 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, c for (; col != col_end; col += 4) { /* should never fail */ if (bone != NULL) { - if (sel_op) { - if ((bone->flag & BONE_UNSELECTABLE) == 0) { - bone->flag |= BONE_SELECTED; + const bool is_select = (bone->flag & BONE_SELECTED) != 0; + const bool is_inside = true; + const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); + + if (sel_op_result != -1) { + if (sel_op_result) { + if ((bone->flag & BONE_UNSELECTABLE) == 0) { + bone->flag |= BONE_SELECTED; + } } - } - else { - bArmature *arm = base->object->data; - if ((bone->flag & BONE_UNSELECTABLE) == 0) { - bone->flag &= ~BONE_SELECTED; - if (arm->act_bone == bone) - arm->act_bone = NULL; + else { + bArmature *arm = base->object->data; + if ((bone->flag & BONE_UNSELECTABLE) == 0) { + bone->flag &= ~BONE_SELECTED; + if (arm->act_bone == bone) + arm->act_bone = NULL; + } } } changed = true; |