diff options
author | Hans Goudey <h.goudey@me.com> | 2021-02-19 22:56:49 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-02-19 22:56:49 +0300 |
commit | 34580748dcf0a3656dd634fc90cb00ec27367376 (patch) | |
tree | 75d813f3697481084410943c61a42d3bbf5f748c /source/blender/editors/space_outliner/outliner_intern.h | |
parent | 55700ac3906f182be8d3dff6f7d63cc27463d91b (diff) |
Fix T83027: Incorrect outliner collection state after operator
The "Hide Collection" operators assigned to the number keys in edit mode
trigger a redraw of the outliner, but as an optimization, they do *not*
trigger a rebuild of the tree.
This optimization is valid because unlike the collection exclude toggle,
the heirarchy is not affected by collection visibility. However, it means
that currently you must trigger a rebuild to get the correct "grayed out"
status after using the operator.
Rather than trigger a rebuild in this case to solve the bug, this patch
moves the decision for whether to gray out the text of a tree element
to the draw step rather than the build step. This means that any change
to the corresponding properties doesn't require a full tree rebuild.
Note that changing the "hide_viewport" property from the outliner still
causes a tree rebuild. I think that's because of the checks in
`outliner_collection_set_flag_recursive_fn`.
That could be optimized in the future.
Differential Revision: https://developer.blender.org/D10240
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_intern.h')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_intern.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index b65b1a57143..9413b7a9613 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -153,8 +153,7 @@ enum { TE_ICONROW = (1 << 1), TE_LAZY_CLOSED = (1 << 2), TE_FREE_NAME = (1 << 3), - TE_DISABLED = (1 << 4), - TE_DRAGGING = (1 << 5), + TE_DRAGGING = (1 << 4), TE_CHILD_NOT_IN_COLLECTION = (1 << 6), /* Child elements of the same type in the icon-row are drawn merged as one icon. * This flag is set for an element that is part of these merged child icons. */ |