core: move number_of_divecomputers to struct dive

Feels natural in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 17:16:14 +02:00 committed by bstoeger
parent e90251b0cf
commit 6e29c00f35
8 changed files with 12 additions and 12 deletions

View file

@ -581,7 +581,7 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
dcText = tr("Manually added dive");
else if (dcText.isEmpty())
dcText = tr("Unknown dive computer");
int nr = number_of_computers(d);
int nr = d->number_of_computers();
if (nr > 1)
dcText += tr(" (#%1 of %2)").arg(dc + 1).arg(nr);
diveComputerText->set(dcText, getColor(TIME_TEXT, isGrayscale));