diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-22 15:23:38 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-23 14:15:23 -0700 |
commit | 33a19328d8a34cc97f39f3726c9f1532742500e1 (patch) | |
tree | eab83b4081374ab057bb5221715168f5b09d9f02 /qt-ui/locationinformation.cpp | |
parent | eb2c78e9536f55f972154c9595ccb588318935d9 (diff) | |
download | subsurface-33a19328d8a34cc97f39f3726c9f1532742500e1.tar.gz |
Block focus out event
The line edit wasn't being properly updated regarding its
paint event. Turns out it was because it received a focus
out event and then stopped refreshing the paint.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 9 |
1 files changed, 8 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(); |