Skip to content

armgit / godot

Public Imported from GitHub
0

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

Fix scene tree drag-n-drop regression

Anish Kumare50d73a47c89
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 203d924eec3..7974827010e 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -6953,7 +6953,7 @@ int Tree::get_drop_section_at_position(const Point2 &p_pos) const {
}
bool Tree::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
- if (using_native_touch) {
+ if (using_native_touch && drag_touching) {
// Disable data drag & drop when touch dragging.
return false;
}
@@ -6962,7 +6962,7 @@ bool Tree::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
}
Variant Tree::get_drag_data(const Point2 &p_point) {
- if (using_native_touch) {
+ if (using_native_touch && drag_touching) {
// Disable data drag & drop when touch dragging.
return Variant();
}