Fix drag and drop on LineEdit
This commit is contained in:
@@ -810,6 +810,10 @@ void Control::set_drag_preview(Control *p_control) {
|
||||
get_viewport()->_gui_set_drag_preview(this, p_control);
|
||||
}
|
||||
|
||||
bool Control::is_drag_successful() const {
|
||||
return is_inside_tree() && get_viewport()->gui_is_drag_successful();
|
||||
}
|
||||
|
||||
void Control::_call_gui_input(const Ref<InputEvent> &p_event) {
|
||||
emit_signal(SceneStringNames::get_singleton()->gui_input, p_event); //signal should be first, so it's possible to override an event (and then accept it)
|
||||
if (!is_inside_tree() || get_viewport()->is_input_handled()) {
|
||||
@@ -2964,6 +2968,7 @@ void Control::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_drag_forwarding", "target"), &Control::set_drag_forwarding);
|
||||
ClassDB::bind_method(D_METHOD("set_drag_preview", "control"), &Control::set_drag_preview);
|
||||
ClassDB::bind_method(D_METHOD("is_drag_successful"), &Control::is_drag_successful);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("warp_mouse", "to_position"), &Control::warp_mouse);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user