Make dure to only call drop_data if can_drop_data returned true, closes #4616
(cherry picked from commit 0e07f49a03
)
This commit is contained in:
parent
edadb46bd4
commit
a71ea0abc6
|
@ -1740,8 +1740,9 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|||
|
||||
Size2 pos = mpos;
|
||||
pos = gui.focus_inv_xform.xform(pos);
|
||||
|
||||
if (gui.mouse_over->can_drop_data(pos,gui.drag_data)) {
|
||||
gui.mouse_over->drop_data(pos,gui.drag_data);
|
||||
}
|
||||
gui.drag_data=Variant();
|
||||
//change mouse accordingly
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue