summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index c48d1e4fc..5732e7043 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -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());
}
}
}