Skip to content

Commit 2b83af7

Browse files
basicerSmallJoker
authored andcommittedJul 28, 2018
Allow enter to select items from combobox's list (#7351)
1 parent e8aad2e commit 2b83af7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎src/gui/guiFormSpecMenu.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2981,7 +2981,9 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
29812981
gui::IGUIElement *focused = Environment->getFocus();
29822982
if (focused && isMyChild(focused) &&
29832983
(focused->getType() == gui::EGUIET_LIST_BOX ||
2984-
focused->getType() == gui::EGUIET_CHECK_BOX)) {
2984+
focused->getType() == gui::EGUIET_CHECK_BOX) &&
2985+
(focused->getParent()->getType() != gui::EGUIET_COMBO_BOX ||
2986+
event.KeyInput.Key != KEY_RETURN)) {
29852987
OnEvent(event);
29862988
return true;
29872989
}

0 commit comments

Comments
 (0)