Skip to content

Commit c4731e1

Browse files
committed
Merge pull request #103168 from Giganzo/tree-edge-hover
Fix Tree hover position with multiple columns
2 parents 5cfa89e + 00527d0 commit c4731e1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scene/gui/tree.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5487,15 +5487,14 @@ Tree::FindColumnButtonResult Tree::_find_column_and_button_at_pos(int p_x, const
54875487
}
54885488
}
54895489

5490-
if (x > col_width) {
5491-
col_ofs += col_width;
5492-
x -= col_width;
5493-
limit_w -= col_width;
5494-
continue;
5490+
if (x < col_width) {
5491+
col = i;
5492+
break;
54955493
}
54965494

5497-
col = i;
5498-
break;
5495+
col_ofs += col_width;
5496+
x -= col_width;
5497+
limit_w -= col_width;
54995498
}
55005499

55015500
if (col >= 0) {

0 commit comments

Comments
 (0)