X Tutup
Skip to content

Fix child relationship lines not being drawn when selecting cells other than first#110024

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
dagarsar:tree-rl
Sep 24, 2025
Merged

Fix child relationship lines not being drawn when selecting cells other than first#110024
Repiteo merged 1 commit intogodotengine:masterfrom
dagarsar:tree-rl

Conversation

@dagarsar
Copy link
Contributor

Fix #110023

@dagarsar dagarsar requested a review from a team as a code owner August 27, 2025 14:17
@AThousandShips AThousandShips changed the title Fix children relationship lines not being drawn when selecting cells other than first Fix child relationship lines not being drawn when selecting cells other than first Aug 27, 2025
@AThousandShips AThousandShips added this to the 4.6 milestone Aug 27, 2025
@AThousandShips AThousandShips added cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Aug 27, 2025
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue is reproducible and fixed, code looks fine.

@dagarsar
Copy link
Contributor Author

dagarsar commented Aug 28, 2025

This code in _is_branch_selected could benefit from the newly created is_any_column_selected method. Should I do a different PR as a follow-up or can it be included in this one?

godot/scene/gui/tree.cpp

Lines 2873 to 2877 in 4ebf67c

for (int i = 0; i < columns.size(); i++) {
if (p_from->is_selected(i)) {
return true;
}
}

There are also other places where is_selected(0) is used and they look like they are hacks to check if the item is selected by checking only the first cell (here and here). Maybe all three of these cases together would make for a follow-up PR?

Edit: after taking a closer look, both cases where is_selected(0) is used are on Trees with only one column, so they are fine, unless we think this could change in the future.

@bruvzg
Copy link
Member

bruvzg commented Aug 28, 2025

Should I do a different PR as a follow-up or can it be included in this one?

It's the same code, so should be fine add it to the same PR.

@dagarsar dagarsar force-pushed the tree-rl branch 2 times, most recently from da74e68 to 3880753 Compare August 28, 2025 12:14
@Repiteo
Copy link
Contributor

Repiteo commented Sep 20, 2025

Needs rebase

@dagarsar
Copy link
Contributor Author

Needs rebase

Done!

@Repiteo Repiteo merged commit 6547174 into godotengine:master Sep 24, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Sep 24, 2025

Thanks!

@dagarsar dagarsar deleted the tree-rl branch September 24, 2025 15:53
@akien-mga akien-mga removed cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release cherrypick:4.5 Considered for cherry-picking into a future 4.5.x release labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Children relationship line is not drawn when selecting cell other than first

6 participants

X Tutup