Fix crash when entering a dive via dive-add on a empty table.
We were selecting garbage, not anymore. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
47c833015b
commit
612c5713b4
@ -152,6 +152,8 @@ void DiveListView::unselectDives()
|
||||
|
||||
void DiveListView::selectDive(int i, bool scrollto, bool toggle)
|
||||
{
|
||||
if( i == -1)
|
||||
return;
|
||||
QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel*>(model());
|
||||
QModelIndexList match = m->match(m->index(0,0), DiveTripModel::DIVE_IDX, i, 2, Qt::MatchRecursive);
|
||||
QItemSelectionModel::SelectionFlags flags;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user