Viewport: Fixup dragging code after a0fb66d

The check was removed by mistake while cherry-picking.
This commit is contained in:
Rémi Verschelde 2021-12-03 13:19:53 +01:00
parent a0fb66d802
commit cd4a08ada3
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -2275,12 +2275,14 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
set_input_as_handled();
bool can_drop = _gui_drop(over, pos, true);
if (gui.drag_data.get_type() != Variant::NIL) {
bool can_drop = _gui_drop(over, pos, true);
if (!can_drop) {
OS::get_singleton()->set_cursor_shape(OS::CURSOR_FORBIDDEN);
} else {
OS::get_singleton()->set_cursor_shape(OS::CURSOR_CAN_DROP);
if (!can_drop) {
OS::get_singleton()->set_cursor_shape(OS::CURSOR_FORBIDDEN);
} else {
OS::get_singleton()->set_cursor_shape(OS::CURSOR_CAN_DROP);
}
}
}