Only trigger a popup's default button if it has one.

This commit is contained in:
Unknown W. Brackets committed 2014-07-19 22:57:09 -07:00
1 parent b980b73f41
commit ed04a0bf28
1 file changed
+1 -1
+1 -1
View File
@@ -150,7 +150,7 @@ bool PopupScreen::touch(const TouchInput &touch) {
bool PopupScreen::key(const KeyInput &key) {
if (key.flags & KEY_DOWN) {
if (key.keyCode == NKCODE_ENTER) {
if (key.keyCode == NKCODE_ENTER && defaultButton_) {
UI::EventParams e;
defaultButton_->OnClick.Trigger(e);
return true;