Commit: fe820eba925d09db5f72eaf41842943344cc8d2f
Author: Joshua Leung
Date:   Thu May 24 13:47:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBfe820eba925d09db5f72eaf41842943344cc8d2f

Cleanup: Some minor tweaks to code

===================================================================

M       source/blender/editors/space_view3d/view3d_select.c

===================================================================

diff --git a/source/blender/editors/space_view3d/view3d_select.c 
b/source/blender/editors/space_view3d/view3d_select.c
index 711bdac9dc0..446089d943e 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2122,25 +2122,24 @@ static int do_object_pose_box_select(bContext *C, 
ViewContext *vc, rcti *rect, b
                                continue;
                        }
                        /* Loop over contiguous bone hits for 'base'. */
-                       bool bone_selected = false;
+                       bool changed = false;
                        for (; col != col_end; col += 4) {
                                /* should never fail */
                                if (bone != NULL) {
                                        if (select) {
                                                if ((bone->flag & 
BONE_UNSELECTABLE) == 0) {
                                                        bone->flag |= 
BONE_SELECTED;
-                                                       bone_selected = true;
                                                }
                                        }
                                        else {
                                                bArmature *arm = 
base->object->data;
                                                if ((bone->flag & 
BONE_UNSELECTABLE) == 0) {
                                                        bone->flag &= 
~BONE_SELECTED;
-                                                       bone_selected = true;
                                                        if (arm->act_bone == 
bone)
                                                                arm->act_bone = 
NULL;
                                                }
                                        }
+                                       changed = true;
                                }
                                else if (!bone_only) {
                                        ED_object_base_select(base, select ? 
BA_SELECT : BA_DESELECT);
@@ -2154,7 +2153,7 @@ static int do_object_pose_box_select(bContext *C, 
ViewContext *vc, rcti *rect, b
 
                                        if ((base->object->pose != NULL) && 
bone_only) {
                                                const uint hit_bone = (col[4] & 
~BONESEL_ANY) >> 16;
-                                               bPoseChannel *pchan = 
BLI_findlink(&base->object->pose->chanbase, hit_bone);;
+                                               bPoseChannel *pchan = 
BLI_findlink(&base->object->pose->chanbase, hit_bone);
                                                bone = pchan ? pchan->bone : 
NULL;
                                        }
                                        else {
@@ -2163,7 +2162,7 @@ static int do_object_pose_box_select(bContext *C, 
ViewContext *vc, rcti *rect, b
                                }
                        }
 
-                       if (bone_selected) {
+                       if (changed) {
                                if (base->object && (base->object->type == 
OB_ARMATURE)) {
                                        bArmature *arm = base->object->data;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to