mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Remove leading spaces in buddy tags
The buddy list generated by the buddy tag logic gets separated by ,<space> so this trims away any leading spaces from the buddy name. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
df0057d262
commit
450093df85
1 changed files with 3 additions and 2 deletions
|
@ -2436,8 +2436,9 @@ void BuddyFilterModel::repopulate()
|
|||
for_each_dive (i, dive) {
|
||||
QString persons = QString(dive->buddy) + "," + QString(dive->divemaster);
|
||||
Q_FOREACH(const QString& person, persons.split(',', QString::SkipEmptyParts)){
|
||||
if (!list.contains(person)) {
|
||||
list.append(person);
|
||||
// Remove any leading spaces
|
||||
if (!list.contains(person.trimmed())) {
|
||||
list.append(person.trimmed());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue