diff options
-rw-r--r-- | qt-ui/locationinformation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 0d3d66231..c03b0e869 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -545,8 +545,8 @@ void DiveLocationLineEdit::fixPopupPosition() } view->setGeometry(pos.x(), pos.y(), w, h); - if (!view->currentIndex().isValid()) { - view->setCurrentIndex(view->model()->index(0, 1)); + if (!view->currentIndex().isValid() && view->model()->rowCount()) { + view->setCurrentIndex(view->model()->index(0, 0)); } } |