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:
parent
cc6967b53c
commit
d95856d3b2
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user