From 26c5bac428c5190ca8d2f44180e5c248fc5e66c9 Mon Sep 17 00:00:00 2001 From: Emmanuel Barroga Date: Mon, 12 Aug 2019 03:39:27 -0700 Subject: 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. --- scene/gui/spin_box.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scene') 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 &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()); } -- cgit v1.2.3