From 34580748dcf0a3656dd634fc90cb00ec27367376 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 19 Feb 2021 13:56:49 -0600 Subject: 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 --- source/blender/editors/space_outliner/outliner_intern.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_intern.h') 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. */ -- cgit v1.2.3