mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
Location completion matches on whole name
When typing in a partial location name, the match now considers the whole text, not just the start of the text. So typing in "Yell" will match both "Yellow House" and "Mellow Yellow". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2c77aa5519
commit
dabb6b2033
1 changed files with 1 additions and 1 deletions
|
@ -290,7 +290,7 @@ bool DiveLocationFilterProxyModel::filterAcceptsRow(int source_row, const QModel
|
|||
return true;
|
||||
|
||||
QString sourceString = sourceModel()->index(source_row, DiveLocationModel::NAME).data(Qt::DisplayRole).toString();
|
||||
return sourceString.toLower().startsWith(location_line_edit->text().toLower());
|
||||
return sourceString.toLower().contains(location_line_edit->text().toLower());
|
||||
}
|
||||
|
||||
bool DiveLocationFilterProxyModel::lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const
|
||||
|
|
Loading…
Add table
Reference in a new issue