Bug 921
Fix GPS search functionality, I mixed up the SQlite wild-card operator.
This commit is contained in:
parent
afcdbd3158
commit
18e3fc0c82
2 changed files with 3 additions and 3 deletions
|
@ -1435,7 +1435,7 @@ FGPositioned::Type GPS::SearchFilter::minType() const
|
|||
|
||||
FGPositioned::Type GPS::SearchFilter::maxType() const
|
||||
{
|
||||
return FGPositioned::WAYPOINT;
|
||||
return FGPositioned::VOR;
|
||||
}
|
||||
|
||||
FGPositioned::Filter* GPS::createFilter(FGPositioned::Type aTy)
|
||||
|
|
|
@ -809,13 +809,13 @@ public:
|
|||
FGPositioned::Filter* filter, bool exact)
|
||||
{
|
||||
string query = s;
|
||||
if (!exact) query += "*";
|
||||
if (!exact) query += "%";
|
||||
|
||||
// build up SQL query text
|
||||
string matchTerm = exact ? "=?1" : " LIKE ?1";
|
||||
string sql = "SELECT rowid FROM positioned WHERE " + column + matchTerm;
|
||||
if (filter) {
|
||||
sql += AND_TYPED;
|
||||
sql += " " AND_TYPED;
|
||||
}
|
||||
|
||||
// find or prepare a suitable statement frrm the SQL
|
||||
|
|
Loading…
Reference in a new issue