From 1ff309c9a1f1d6a4bcbb7afb2561a412ae64903d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 25 Oct 2015 10:38:16 +0900 Subject: Fix location edit UI issue on Mac For some reason the Mac doesn't create an "activated" signal when hitting enter/return on the drop down. So we simply manually send this and now you can select the site with enter/return just like on Linux or Windows. Fixes #953 Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index e581757dd..aee0b7328 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -425,6 +425,12 @@ bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e) if (keyEv->key() == Qt::Key_Return || keyEv->key() == Qt::Key_Enter) { +#if __APPLE__ + // for some reason it seems like on a Mac hitting return/enter + // doesn't call 'activated' for that index. so let's do it manually + if (view->currentIndex().isValid()) + itemActivated(view->currentIndex()); +#endif view->hide(); return false; } -- cgit v1.2.3-70-g09d2