From 2b83af783bc85963c8088d354ebc9eaea17a92b9 Mon Sep 17 00:00:00 2001 From: Rob Blanckaert Date: Sat, 28 Jul 2018 03:58:16 -0700 Subject: Allow enter to select items from combobox's list (#7351) --- src/gui/guiFormSpecMenu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/guiFormSpecMenu.cpp') diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index e522769f7..82210c591 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -2981,7 +2981,9 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event) gui::IGUIElement *focused = Environment->getFocus(); if (focused && isMyChild(focused) && (focused->getType() == gui::EGUIET_LIST_BOX || - focused->getType() == gui::EGUIET_CHECK_BOX)) { + focused->getType() == gui::EGUIET_CHECK_BOX) && + (focused->getParent()->getType() != gui::EGUIET_COMBO_BOX || + event.KeyInput.Key != KEY_RETURN)) { OnEvent(event); return true; } -- cgit v1.2.3