diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-24 11:11:39 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-06 09:35:19 -0800 |
commit | ea9303ff3cff8ea7c353b8a0c53e13e82f897360 (patch) | |
tree | d6203808c2bbc4e97c35f9fe20622b164eb1f684 | |
parent | 0a65fe500b35b5a2e53bc5a3b173cb9493986f8f (diff) | |
download | subsurface-ea9303ff3cff8ea7c353b8a0c53e13e82f897360.tar.gz |
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>
-rw-r--r-- | qt-ui/locationinformation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index aee0b7328..8e40e1b53 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -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 |