aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorRob Blanckaert <basicer@basicer.com>2018-07-28 03:58:16 -0700
committerSmallJoker <SmallJoker@users.noreply.github.com>2018-07-28 12:58:16 +0200
commit2b83af783bc85963c8088d354ebc9eaea17a92b9 (patch)
treea056c09a901dc8651e33e433f35430f2a12983e3 /src/gui/guiFormSpecMenu.cpp
parente8aad2ee0078733b5981e1a6e47876a4b115007d (diff)
downloadminetest-2b83af783bc85963c8088d354ebc9eaea17a92b9.tar.gz
minetest-2b83af783bc85963c8088d354ebc9eaea17a92b9.tar.bz2
minetest-2b83af783bc85963c8088d354ebc9eaea17a92b9.zip
Allow enter to select items from combobox's list (#7351)
Diffstat (limited to 'src/gui/guiFormSpecMenu.cpp')
-rw-r--r--src/gui/guiFormSpecMenu.cpp4
1 files changed, 3 insertions, 1 deletions
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;
}