diff options
author | Julian Eisel <julian@blender.org> | 2020-10-15 21:00:18 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-10-15 21:31:36 +0300 |
commit | 5129e2e042a057a28ea75e4342a664277c74ca34 (patch) | |
tree | d20e13d79dae8fee8819bef58da9a194b2be44cc /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 5efb104003d41664d6412279fb546ee53767d384 (diff) |
Fix T81675: Renaming collapsed collection in Outliner renames nested items
* `do_outliner_item_rename()` enables the rename mode for the item under the
cursor. Issue is, collapsed children end up having stored the same coordinate
as their parent, so they too would get the rename mode enabled (there is no
early-exit that would hide this).
* The items displayed as inline icons do get the proper coordinates of the
icons, so they are not mistaken as being under the cursor.
After rBb077de086e14, the Outliner tree is rebuilt less often, so the
coordinates are cleared less often too.
As far as I can see we can always clear coordinates of invisible items now. No
code seems to depend on keeping the old coordinates anymore.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 22bc0119652..09ccb950c18 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2915,9 +2915,9 @@ static void outliner_set_coord_tree_element(TreeElement *te, int startx, int sta /* closed items may be displayed in row of parent, don't change their coordinate! */ if ((te->flag & TE_ICONROW) == 0 && (te->flag & TE_ICONROW_MERGED) == 0) { - /* store coord and continue, we need coordinates for elements outside view too */ - te->xs = startx; - te->ys = starty; + te->xs = 0; + te->ys = 0; + te->xend = 0; } for (ten = te->subtree.first; ten; ten = ten->next) { |