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>
This commit is contained in:
Tomaz Canabrava 2015-09-23 16:19:58 -03:00 committed by Dirk Hohndel
parent cc6967b53c
commit d95856d3b2

View file

@ -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();
}
}