Fix T71554: 'Hide Unselected' not working for certain selections

rBc6cbcf83d015 caused to early out e.g when not all faces were selected
(but surrounding faces were, so implicitly all vertices were selected).
Now take (mixed also) selection mode into account.

Maniphest Tasks: T71554

Differential Revision: https://developer.blender.org/D6254
This commit is contained in:
Philipp Oeser 2019-11-14 12:31:36 +01:00
parent 04272613a7
commit 08588d06e8
Notes: blender-bot 2023-02-14 10:21:11 +01:00
Referenced by issue #71554, Hide unselected (mesh) doesn't work for certain selections
1 changed files with 14 additions and 2 deletions

View File

@ -2094,8 +2094,20 @@ static int edbm_hide_exec(bContext *C, wmOperator *op)
BMesh *bm = em->bm;
if (unselected) {
if (bm->totvertsel == bm->totvert) {
continue;
if (em->selectmode & SCE_SELECT_VERTEX) {
if (bm->totvertsel == bm->totvert) {
continue;
}
}
else if (em->selectmode & SCE_SELECT_EDGE) {
if (bm->totedgesel == bm->totedge) {
continue;
}
}
else if (em->selectmode & SCE_SELECT_FACE) {
if (bm->totfacesel == bm->totface) {
continue;
}
}
}
else {