Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Prevent sticky TreeItems from being considered during drag

vaner-orgdb1c31335b5c
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 2e2e4bf6536..cae2e1d1aca 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -5680,8 +5680,8 @@ void Tree::_notification(int p_what) {
}
sticky_stack_end = 0;
+ sticky_list.clear();
if (root && !drop_mode_flags) {
- sticky_list.clear();
Vector2 stick_ofs;
Vector2 last_ofs = stick_ofs;
real_t height_limit = get_size().y * .4; // Prevent sticky items from ever exceeding 40% of the space