diff options
-rw-r--r-- | qt-ui/locationinformation.cpp | 9 | ||||
-rw-r--r-- | qt-ui/locationinformation.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 71def344e..822184473 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -396,7 +396,6 @@ int DiveLocationModel::rowCount(const QModelIndex& parent) const return dive_site_table.nr + 2; } - bool DiveLocationModel::setData(const QModelIndex& index, const QVariant& value, int role) { if(!index.isValid()) @@ -465,6 +464,14 @@ bool DiveLocationLineEdit::eventFilter(QObject *o, QEvent *e) return false; } +void DiveLocationLineEdit::focusOutEvent(QFocusEvent* ev) +{ + if (!view->isVisible()) { + qDebug() << "Focusing Out"; + QLineEdit::focusOutEvent(ev); + } +} + void DiveLocationLineEdit::itemActivated(const QModelIndex& index) { qDebug() << "Activated" << index.data(); diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h index 6df56f05c..2b41f5276 100644 --- a/qt-ui/locationinformation.h +++ b/qt-ui/locationinformation.h @@ -103,6 +103,7 @@ public: protected: void keyPressEvent(QKeyEvent *ev); + void focusOutEvent(QFocusEvent *ev); void showPopup(); private: DiveLocationFilterProxyModel *proxy; |