Skip to content

Reset drag unfold timer when mouse exits Tree#115295

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
Akosmo:hover-treeitem-fix
Jan 26, 2026
Merged

Reset drag unfold timer when mouse exits Tree#115295
Repiteo merged 1 commit into
godotengine:masterfrom
Akosmo:hover-treeitem-fix

Conversation

@Akosmo

@Akosmo Akosmo commented Jan 23, 2026

Copy link
Copy Markdown
Member

Fixes: #115271
Kind of a regression fix of #110904 , since it was introduced during the dev phase of 4.6

Using _reset_drop_mode_over() on NOTIFICATION_MOUSE_EXIT, if enable_drag_unfolding and drop_mode_over (user is dragging TreeItem) are true. Originally, the timer for unfolding would start, but not stop if mouse had exited the tree. drop_mode_over is not nullptr, even after the mouse leaves Tree, and this variable is used for conditional instead drop_mode_flags, because the latter already resets to 0 through other means, meanwhile I only found drop_mode_over to reset inside _reset_drop_mode_over(), which originally is only called when drop_mode_flags = 0 during NOTIFICATION_DRAG_END.
drop_mode_over is reassigned once mouse enters Tree again, and _reset_drop_mode_over() already checks if the timer is running.

@Akosmo Akosmo requested a review from a team as a code owner January 23, 2026 10:56
@AThousandShips AThousandShips added this to the 4.x milestone Jan 23, 2026
@KoBeWi KoBeWi modified the milestones: 4.x, 4.7 Jan 23, 2026
@Repiteo Repiteo merged commit 43fbc53 into godotengine:master Jan 26, 2026
20 checks passed
@Repiteo

Repiteo commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Thanks! Congratulations on your first merged contribution! 🎉

@Akosmo Akosmo deleted the hover-treeitem-fix branch January 26, 2026 22:38
rivie13 pushed a commit to rivie13/Phoenix-Agentic-Engine that referenced this pull request Feb 16, 2026
Reset drag unfold timer when mouse exits Tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants