Permalink
Browse files

Allow enter to select items from combobox's list (#7351)

  • Loading branch information...
basicer authored and SmallJoker committed Jul 28, 2018
1 parent e8aad2e commit 2b83af783bc85963c8088d354ebc9eaea17a92b9
Showing with 3 additions and 1 deletion.
  1. +3 −1 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;
}

0 comments on commit 2b83af7

Please sign in to comment.