Fix conditional logic in 'synced_selection' check

The conditional `(selected ? 0 : bm->totvert)` should be evaluated first.
This commit is contained in:
Germano Cavalcante
2023-09-02 14:50:58 -03:00
parent 79a6a6977a
commit 7b0b2e4a5d

View File

@@ -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;
}