summaryrefslogtreecommitdiffstats
path: root/scene/gui/spin_box.cpp
diff options
context:
space:
mode:
authorEmmanuel Barroga <emmanuelbarroga@gmail.com>2019-08-12 03:39:27 -0700
committerEmmanuel Barroga <emmanuelbarroga@gmail.com>2019-08-12 03:39:27 -0700
commit26c5bac428c5190ca8d2f44180e5c248fc5e66c9 (patch)
tree1288167ef712860884d005f405d99a6d3e3a9aef /scene/gui/spin_box.cpp
parent0e823cffbc5e03805e6850bc41e168b0bdecf24e (diff)
downloadredot-engine-26c5bac428c5190ca8d2f44180e5c248fc5e66c9.tar.gz
Fix Right-Click Menu Deselecting Edits Content
Right-clicking a property to open the context menu deselects the text field. This causes the context menu to be useless because it doesn't have anything to edit.
Diffstat (limited to 'scene/gui/spin_box.cpp')
-rw-r--r--scene/gui/spin_box.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index db277d3705..6ada0cba97 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -170,6 +170,10 @@ void SpinBox::_gui_input(const Ref<InputEvent> &p_event) {
void SpinBox::_line_edit_focus_exit() {
+ // discontinue because the focus_exit was caused by right-click context menu
+ if (line_edit->get_menu()->is_visible())
+ return;
+
_text_entered(line_edit->get_text());
}