mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show single buddies instead on the filter.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1f4b407323
commit
4e9aff047e
1 changed files with 5 additions and 7 deletions
|
@ -2417,13 +2417,11 @@ void BuddyFilterModel::repopulate()
|
|||
struct dive *dive;
|
||||
int i = 0;
|
||||
for_each_dive (i, dive) {
|
||||
QString buddy(dive->buddy);
|
||||
QString divemaster(dive->divemaster);
|
||||
if (!buddy.isEmpty() && !list.contains(buddy)) {
|
||||
list.append(buddy);
|
||||
}
|
||||
if (!divemaster.isEmpty() && !list.contains(divemaster)) {
|
||||
list.append(divemaster);
|
||||
QString persons = QString(dive->buddy) + "," + QString(dive->divemaster);
|
||||
Q_FOREACH(const QString& person, persons.split(',', QString::SkipEmptyParts)){
|
||||
if (!list.contains(person)) {
|
||||
list.append(person);
|
||||
}
|
||||
}
|
||||
}
|
||||
qSort(list);
|
||||
|
|
Loading…
Add table
Reference in a new issue