mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Mobile: use a default weight name when adding weight system
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b92edc9ab
commit
0eb14828b5
1 changed files with 3 additions and 3 deletions
|
@ -1045,8 +1045,8 @@ void QMLManager::commitChanges(QString diveId, QString date, QString location, Q
|
|||
// not sure what we'd do if there was more than one weight system
|
||||
// defined - for now just ignore that case
|
||||
if (d->weightsystems.nr == 0) {
|
||||
weightsystem_t ws = { { parseWeightToGrams(weight) } , "" };
|
||||
add_cloned_weightsystem(&d->weightsystems, ws);
|
||||
weightsystem_t ws = { { parseWeightToGrams(weight) } , strdup(qPrintable(tr("weight"))) };
|
||||
add_to_weightsystem_table(&d->weightsystems, 0, ws); // takes ownership of the string
|
||||
} else if (d->weightsystems.nr == 1) {
|
||||
d->weightsystems.weightsystems[0].weight.grams = parseWeightToGrams(weight);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue