-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't return Tree items outside visible rect #102262
base: master
Are you sure you want to change the base?
Conversation
ac9f483
to
abdef36
Compare
Added checks and early returns to all |
abdef36
to
873142a
Compare
873142a
to
c14a57a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, one more nitpick.
TreeItem *Tree::_find_item_at_pos(TreeItem *p_item, const Point2 &p_pos, int &r_column, int &r_height, int &r_section) const { | ||
r_column = -1; | ||
r_height = 0; | ||
r_section = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r_section = -1; | |
r_section = -100; |
-1
is a valid section indicator, get_drop_section_at_position
returns -100
as invalid one, these should be consistent.
(and yeah, they could be constants...)
Fixes #102146
Likely needs some testing.