Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2020-12-18 02:28:24 +0300
committerJeroen Bakker <jeroen@blender.org>2021-01-13 17:00:37 +0300
commitafc1e3913a0d35628c76fe2229ff09585f4dc644 (patch)
treefdcc12f8f700bd4ec07aaca2669828a837ebf036
parent37d450b518f593b0c5b6a634adbf565397d621de (diff)
Fix T82960: Inaccurate selection on collapsed outliner rows
After rB15083d9e1 the outliner tree is not rebuilt after expanding or collapsing rows. Because the tree is no longer rebuilt the positions and flags of the elements are not cleared when collapsing a row. This caused hover highlights and selections on the collapsed child icons to be incorrect in many cases. For example, only the direct children of a collapsed element are drawn inline. If any grandchild elements had been previously icon row flagged they would continue to be evaluated as icon row elements despite being hidden. In this case the x coordinates of the child and grandchild would overlap causing selection to appear erratic. Now the flags for inline row icons are explicitly cleared, which was previously only done because the tree was rebuilt on collapsing rows.
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index ea2e3ce2565..88ff39d0626 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2845,6 +2845,7 @@ static void outliner_draw_iconrow(bContext *C,
LISTBASE_FOREACH (TreeElement *, te, lb) {
TreeStoreElem *tselem = TREESTORE(te);
+ te->flag &= ~(TE_ICONROW | TE_ICONROW_MERGED);
/* object hierarchy always, further constrained on level */
if (level < 1 || (tselem->type == 0 && te->idcode == ID_OB)) {