summaryrefslogtreecommitdiffstats
path: root/editor/gui/editor_spin_slider.cpp
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-06-16 09:21:22 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-06-16 09:39:49 +0200
commit42402aa7db62de4c1d00a43a88c13f52e54721e5 (patch)
tree17067cd24a7252e9e7a4e7dd850c9ea3d7edbcf2 /editor/gui/editor_spin_slider.cpp
parentc0d8d91b15597209a1ca865c6ff4f84f06f7de86 (diff)
downloadredot-engine-42402aa7db62de4c1d00a43a88c13f52e54721e5.tar.gz
Fix the distance for grabbing a EditorSpinSlider
Currently moving the mouse for a single pixel is enough to trigger grabbing, which happens often unintentionally.
Diffstat (limited to 'editor/gui/editor_spin_slider.cpp')
-rw-r--r--editor/gui/editor_spin_slider.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/gui/editor_spin_slider.cpp b/editor/gui/editor_spin_slider.cpp
index 6d02fcef1d..451827da09 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<InputEvent> &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;
}