Properly handle multiple parent drag, fixes #19460
This commit is contained in:
parent
35fbbeb99b
commit
55ded6b2de
1 changed files with 6 additions and 0 deletions
|
@ -1900,7 +1900,13 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
|
|||
if (gui.drag_data.get_type() != Variant::NIL) {
|
||||
|
||||
gui.mouse_focus = NULL;
|
||||
break;
|
||||
} else {
|
||||
if (gui.drag_preview != NULL) {
|
||||
ERR_PRINT("Don't set a drag preview and return null data. Preview was deleted and drag request ignored.");
|
||||
memdelete(gui.drag_preview);
|
||||
gui.drag_preview = NULL;
|
||||
}
|
||||
gui.dragging = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue