mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: Allow multiple divemasters
While not something that many will use, editing a dive on Subsurface-mobile should not result in data loss. This makes the divemaster field behave in the same way as the buddy field with regards to multiple entries. Fixes #1853 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
15c7ee5db0
commit
03143f1ef1
2 changed files with 9 additions and 1 deletions
|
@ -1093,6 +1093,9 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
|
|||
d->buddy = copy_qstring(buddy);
|
||||
}
|
||||
if (myDive->divemaster() != diveMaster) {
|
||||
if (diveMaster.contains(",")){
|
||||
diveMaster = diveMaster.replace(QRegExp("\\s*,\\s*"), ", ");
|
||||
}
|
||||
diveChanged = true;
|
||||
free(d->divemaster);
|
||||
d->divemaster = copy_qstring(diveMaster);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue