From 2b83af783bc85963c8088d354ebc9eaea17a92b9 Mon Sep 17 00:00:00 2001 From: Rob Blanckaert Date: Sat, 28 Jul 2018 03:58:16 -0700 Subject: [PATCH] Allow enter to select items from combobox's list (#7351) --- src/gui/guiFormSpecMenu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.25.1