Fix drag&drop broken
This commit is contained in:
parent
5baddc2f3e
commit
ec2fd2b143
|
@ -210,7 +210,7 @@ void TaskTree::deselect() {
|
|||
}
|
||||
}
|
||||
|
||||
Variant TaskTree::_get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
||||
Variant TaskTree::_get_drag_data_fw(const Point2 &p_point) {
|
||||
if (editable && tree->get_item_at_position(p_point)) {
|
||||
Dictionary drag_data;
|
||||
drag_data["type"] = "task";
|
||||
|
@ -221,7 +221,7 @@ Variant TaskTree::_get_drag_data_fw(const Point2 &p_point, Control *p_from) {
|
|||
return Variant();
|
||||
}
|
||||
|
||||
bool TaskTree::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const {
|
||||
bool TaskTree::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data) const {
|
||||
if (!editable) {
|
||||
return false;
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ bool TaskTree::_can_drop_data_fw(const Point2 &p_point, const Variant &p_data, C
|
|||
return false;
|
||||
}
|
||||
|
||||
void TaskTree::_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) {
|
||||
void TaskTree::_drop_data_fw(const Point2 &p_point, const Variant &p_data) {
|
||||
Dictionary d = p_data;
|
||||
TreeItem *item = tree->get_item_at_position(p_point);
|
||||
if (item && d.has("task")) {
|
||||
|
|
|
@ -41,9 +41,9 @@ private:
|
|||
void _on_item_mouse_selected(const Vector2 &p_pos, int p_button_index);
|
||||
void _on_task_changed();
|
||||
|
||||
Variant _get_drag_data_fw(const Point2 &p_point, Control *p_from);
|
||||
bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
|
||||
void _drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
|
||||
Variant _get_drag_data_fw(const Point2 &p_point);
|
||||
bool _can_drop_data_fw(const Point2 &p_point, const Variant &p_data) const;
|
||||
void _drop_data_fw(const Point2 &p_point, const Variant &p_data);
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
Loading…
Reference in New Issue