1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Prevent dragging from SceneTree buttons

(cherry picked from commit 45d0799b5b)
This commit is contained in:
Haoyu Qiu
2019-12-13 13:13:47 +08:00
committed by Rémi Verschelde
parent 50d69a5a3d
commit 38509f1a89
3 changed files with 46 additions and 0 deletions

View File

@@ -928,6 +928,10 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
if (!can_rename)
return Variant(); //not editable tree
if (tree->get_button_id_at_position(p_point) != -1) {
return Variant(); //dragging from button
}
Vector<Node *> selected;
Vector<Ref<Texture> > icons;
TreeItem *next = tree->get_next_selected(NULL);