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

Prevent dragging from SceneTree buttons

This commit is contained in:
Haoyu Qiu
2019-12-13 13:13:47 +08:00
parent b65ebfc7e7
commit 45d0799b5b
3 changed files with 46 additions and 0 deletions

View File

@@ -902,6 +902,10 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
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<Texture2D>> icons;
TreeItem *next = tree->get_next_selected(nullptr);