From 42402aa7db62de4c1d00a43a88c13f52e54721e5 Mon Sep 17 00:00:00 2001 From: Markus Sauermann <6299227+Sauermann@users.noreply.github.com> Date: Fri, 16 Jun 2023 09:21:22 +0200 Subject: [PATCH] Fix the distance for grabbing a EditorSpinSlider Currently moving the mouse for a single pixel is enough to trigger grabbing, which happens often unintentionally. --- editor/gui/editor_spin_slider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/gui/editor_spin_slider.cpp b/editor/gui/editor_spin_slider.cpp index 6d02fcef1df..451827da09c 100644 --- a/editor/gui/editor_spin_slider.cpp +++ b/editor/gui/editor_spin_slider.cpp @@ -106,7 +106,7 @@ void EditorSpinSlider::gui_input(const Ref &p_event) { } grabbing_spinner_dist_cache += diff_x * grabbing_spinner_speed; - if (!grabbing_spinner && ABS(grabbing_spinner_dist_cache) > 4 * EDSCALE) { + if (!grabbing_spinner && ABS(grabbing_spinner_dist_cache) > 4 * grabbing_spinner_speed * EDSCALE) { Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_CAPTURED); grabbing_spinner = true; }