summaryrefslogtreecommitdiff
path: root/editor/editor_spin_slider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_spin_slider.cpp')
-rw-r--r--editor/editor_spin_slider.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 35fe366526..918b0ef96d 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -109,13 +109,8 @@ void EditorSpinSlider::_gui_input(const Ref<InputEvent> &p_event) {
}
if (grabbing_spinner) {
- if (mm->get_control() || updown_offset != -1) {
- set_value(Math::round(get_value()));
- if (ABS(grabbing_spinner_dist_cache) > 6) {
- set_value(get_value() + SGN(grabbing_spinner_dist_cache));
- grabbing_spinner_dist_cache = 0;
- pre_grab_value = get_value();
- }
+ if (mm->get_control()) {
+ set_value(Math::round(pre_grab_value + get_step() * grabbing_spinner_dist_cache * 10));
} else {
set_value(pre_grab_value + get_step() * grabbing_spinner_dist_cache * 10);
}