From 5129e2e042a057a28ea75e4342a664277c74ca34 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 15 Oct 2020 20:00:18 +0200 Subject: [PATCH] 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. --- source/blender/editors/space_outliner/outliner_draw.c | 6 +++--- 1 file 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) {