mirror of
https://github.com/godotengine/godot.git
synced 2024-11-15 08:32:54 +00:00
Fix the issue preventing dragging in the 2D and visual shader editor
This commit is contained in:
parent
4d5f10fc3a
commit
2c7633dce5
@ -130,7 +130,12 @@ bool ViewPanner::gui_input(const Ref<InputEvent> &p_event, Rect2 p_canvas_rect)
|
||||
|
||||
Ref<InputEventScreenDrag> screen_drag = p_event;
|
||||
if (screen_drag.is_valid()) {
|
||||
callback_helper(pan_callback, varray(screen_drag->get_relative(), p_event));
|
||||
if (Input::get_singleton()->is_emulating_mouse_from_touch() || Input::get_singleton()->is_emulating_touch_from_mouse()) {
|
||||
// This set of events also generates/is generated by
|
||||
// InputEventMouseButton/InputEventMouseMotion events which will be processed instead.
|
||||
} else {
|
||||
callback_helper(pan_callback, varray(screen_drag->get_relative(), p_event));
|
||||
}
|
||||
}
|
||||
|
||||
Ref<InputEventKey> k = p_event;
|
||||
|
Loading…
Reference in New Issue
Block a user