diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2019-11-14 14:31:36 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-11-19 11:51:06 +0300 |
commit | 08588d06e86a096c51ac70da53e74bab67f6a036 (patch) | |
tree | 029a63abff73d7dfbbfa99ac5be24ea2a4072f63 /source | |
parent | 04272613a78d805e900941b21df16dbbcafc6849 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index eb50babf395..f5ff3d0655e 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -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 { |