diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 62cdad22b38..9e31a5324b7 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1740,8 +1740,9 @@ void Viewport::_gui_input_event(InputEvent p_event) { Size2 pos = mpos; pos = gui.focus_inv_xform.xform(pos); - - gui.mouse_over->drop_data(pos,gui.drag_data); + 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 }