mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
QML UI: update profile when editing duration of manually added dive
We need to make sure that a new fake DC is created after the duration was changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
880f1c5644
commit
cd713d421b
1 changed files with 8 additions and 0 deletions
|
@ -476,6 +476,14 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
|
|||
m = r6.cap(1).toInt();
|
||||
}
|
||||
d->dc.duration.seconds = d->duration.seconds = h * 3600 + m * 60 + s;
|
||||
if (same_string(d->dc.model, "manually added dive")) {
|
||||
free(d->dc.sample);
|
||||
d->dc.sample = 0;
|
||||
d->dc.samples = 0;
|
||||
} else {
|
||||
qDebug() << "changing the duration on a dive that wasn't manually added - Uh-oh";
|
||||
}
|
||||
|
||||
}
|
||||
if (get_depth_string(d->maxdepth.mm, true, true) != depth) {
|
||||
int depthValue = parseLengthToMm(depth);
|
||||
|
|
Loading…
Add table
Reference in a new issue