diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-09-23 16:19:58 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-23 14:15:49 -0700 |
commit | d95856d3b272671fe9db008605ea84b27195f46b (patch) | |
tree | ec3e10b334624fa3682389ee4595140764d174be /qt-ui | |
parent | cc6967b53c0ac6b0a3b892454413247f0e365b72 (diff) | |
download | subsurface-d95856d3b272671fe9db008605ea84b27195f46b.tar.gz |
Select an index if no index is selected
Defaults to first row.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/locationinformation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 56ef2d7f3..8e08a60be 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -522,6 +522,9 @@ void DiveLocationLineEdit::fixPopupPosition() } view->setGeometry(pos.x(), pos.y(), w, h); + if(!view->currentIndex().isValid()) { + view->setCurrentIndex(view->model()->index(0,1)); + } } void DiveLocationLineEdit::showPopup() @@ -530,7 +533,6 @@ void DiveLocationLineEdit::showPopup() if (!view->isVisible()) { setTemporaryDiveSiteName(text()); proxy->invalidate(); - view->setCurrentIndex(view->model()->index(0,1)); view->show(); } } |