Skip to content

Commit

Permalink
Allow enter to select items from combobox's list (#7351)
Browse files Browse the repository at this point in the history
  • Loading branch information
basicer authored and SmallJoker committed Jul 28, 2018
1 parent e8aad2e commit 2b83af7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/gui/guiFormSpecMenu.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2b83af7

Please sign in to comment.