From 7b0b2e4a5dfeba8d249b854c547ef6df44a75b80 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Sat, 2 Sep 2023 14:50:58 -0300 Subject: [PATCH] Fix conditional logic in 'synced_selection' check The conditional `(selected ? 0 : bm->totvert)` should be evaluated first. --- source/blender/editors/uvedit/uvedit_ops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/uvedit/uvedit_ops.cc b/source/blender/editors/uvedit/uvedit_ops.cc index d736d47da81..ac0b5a16220 100644 --- a/source/blender/editors/uvedit/uvedit_ops.cc +++ b/source/blender/editors/uvedit/uvedit_ops.cc @@ -202,7 +202,7 @@ void ED_uvedit_foreach_uv(const Scene *scene, { /* Check selection for quick return. */ const bool synced_selection = (scene->toolsettings->uv_flag & UV_SYNC_SELECTION) != 0; - if (synced_selection && (bm->totvertsel == selected ? 0 : bm->totvert)) { + if (synced_selection && bm->totvertsel == (selected ? 0 : bm->totvert)) { return; }