Merge pull request #31317 from sparkart/master

Fix Right-Click Menu Deselecting  Edits Content
This commit is contained in:
Rémi Verschelde 2019-08-13 08:25:38 +02:00 committed by GitHub
commit a476a5b71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -347,6 +347,11 @@ void EditorSpinSlider::_value_input_closed() {
//focus_exited signal
void EditorSpinSlider::_value_focus_exited() {
// discontinue because the focus_exit was caused by right-click context menu
if (value_input->get_menu()->is_visible())
return;
_evaluate_input_text();
// focus is not on the same element after the vlalue_input was exited
// -> focus is on next element

View file

@ -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());
}