diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-10-23 07:43:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 07:43:47 +0200 |
commit | b1c6ba9b246f0831d54d8f8384b21b21dd4b6ea4 (patch) | |
tree | e195c09fcc6a295fec548c0dba1ddf27bc7aa5a9 /scene/gui | |
parent | 19fa163d9a3bd3bfcb5d030b9134bff2b850323c (diff) | |
parent | 53d6d37fcf719067129fd0c2957154ff6a058ba9 (diff) |
Merge pull request #32972 from codecustard/fix_spinbox_not_releasingfocus
Fixes spinbox not releasing focus on value change
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/spin_box.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp index 172c366c41..bf067898e6 100644 --- a/scene/gui/spin_box.cpp +++ b/scene/gui/spin_box.cpp @@ -108,21 +108,21 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) { case BUTTON_LEFT: { + line_edit->grab_focus(); + set_value(get_value() + (up ? get_step() : -get_step())); range_click_timer->set_wait_time(0.6); range_click_timer->set_one_shot(true); range_click_timer->start(); - line_edit->grab_focus(); - drag.allowed = true; drag.capture_pos = mb->get_position(); } break; case BUTTON_RIGHT: { - set_value((up ? get_max() : get_min())); line_edit->grab_focus(); + set_value((up ? get_max() : get_min())); } break; case BUTTON_WHEEL_UP: { if (line_edit->has_focus()) { |