[Bf-blender-cvs] [69c42ad57bd] blender2.8: Cleanup: consistent changed_multi assignment

Campbell Barton noreply at git.blender.org
Wed Apr 18 19:22:02 CEST 2018


Commit: 69c42ad57bd614284810d2c9cd34ede320f6f587
Author: Campbell Barton
Date:   Wed Apr 18 19:20:06 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB69c42ad57bd614284810d2c9cd34ede320f6f587

Cleanup: consistent changed_multi assignment

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

M	source/blender/editors/armature/pose_edit.c
M	source/blender/editors/uvedit/uvedit_ops.c
M	source/blender/editors/uvedit/uvedit_unwrap_ops.c

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

diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index f8032c40a8e..c1e9346efdd 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -1101,9 +1101,9 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
 
 		bool changed = bone_looper(ob_iter, arm->bonebase.first, hide_select_p, hide_pose_bone_fn) != 0;
 		if (changed) {
+			changed_multi = true;
 			/* note, notifier might evolve */
 			WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
-			changed_multi = true;
 		}
 	}
 	MEM_freeN(objects);
@@ -1164,9 +1164,9 @@ static int pose_reveal_exec(bContext *C, wmOperator *op)
 
 		bool changed = bone_looper(ob_iter, arm->bonebase.first, select_p, show_pose_bone_cb);
 		if (changed) {
+			changed_multi = true;
 			/* note, notifier might evolve */
 			WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob_iter);
-			changed_multi = true;
 		}
 	}
 	MEM_freeN(objects);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index e8e20c1cad5..06b408a04ae 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -3127,21 +3127,19 @@ static int uv_border_select_exec(bContext *C, wmOperator *op)
 		}
 
 		if (changed) {
+			changed_multi = true;
+
 			uv_select_sync_flush(ts, em, select);
 
 			if (ts->uv_flag & UV_SYNC_SELECTION) {
 				WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 			}
 		}
-		changed_multi |= changed;
 	}
 
 	MEM_SAFE_FREE(objects);
 
-	if (changed_multi) {
-		return OPERATOR_FINISHED;
-	}
-	return OPERATOR_CANCELLED;
+	return changed_multi ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
 }
 
 static void UV_OT_select_border(wmOperatorType *ot)
@@ -3391,14 +3389,14 @@ static bool do_lasso_select_mesh_uv(bContext *C, const int mcords[][2], short mo
 		}
 
 		if (changed) {
+			changed_multi = true;
+
 			uv_select_sync_flush(scene->toolsettings, em, select);
 
 			if (ts->uv_flag & UV_SYNC_SELECTION) {
 				WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
 			}
 		}
-
-		changed_multi |= changed;
 	}
 
 	return changed_multi;
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 828f84855ce..7c87905775b 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1542,11 +1542,11 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
 		}
 
 		if (changed) {
+			changed_multi = true;
 			uv_map_clip_correct(scene, obedit, em, op);
 
 			DEG_id_tag_update(obedit->data, 0);
 			WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data);
-			changed_multi = true;
 		}
 	}
 	MEM_SAFE_FREE(objects);



More information about the Bf-blender-cvs mailing list