summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/locationinformation.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 822184473..c446cada7 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -449,10 +449,18 @@ bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e)
return true;
}
- if(keyEv->key() == Qt::Key_Return || keyEv->key() == Qt::Key_Enter) {
+ if(keyEv->key() == Qt::Key_Return ||
+ keyEv->key() == Qt::Key_Enter) {
view->hide();
return false;
}
+
+ if (keyEv->key() == Qt::Key_Space ||
+ keyEv->key() == Qt::Key_Tab){
+ itemActivated(view->currentIndex());
+ view->hide();
+ return false;
+ }
event(e);
} else if(e->type() == QEvent::MouseButtonPress ) {
if (!view->underMouse()) {
@@ -560,6 +568,7 @@ void DiveLocationLineEdit::showPopup()
view->setGeometry(pos.x(), pos.y(), w, h);
if (!view->isVisible()) {
+ setTemporaryDiveSiteName(text());
proxy->invalidate();
view->show();
}