Cleanup: Improve the Use of 'Planned dive' and 'Manually added dive'.

- standardise the naming;
- use it consistently;
- apply the 'samples < 50' only when putting manually added dives into
  edit mode - everywhere else manually added dives should be treated as
  such;
- do not show a warning before editing a manually added dive in planner.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
Michael Keller 2024-05-23 16:06:23 +12:00 committed by bstoeger
parent ecc6f64d10
commit 1aa5438b2d
10 changed files with 47 additions and 34 deletions

View file

@ -8,6 +8,7 @@
#include "divetextitem.h"
#include "tankitem.h"
#include "core/device.h"
#include "core/divecomputer.h"
#include "core/event.h"
#include "core/pref.h"
#include "core/profile.h"
@ -579,9 +580,9 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
}
QString dcText = get_dc_nickname(currentdc);
if (dcText == "planned dive")
if (is_dc_planner(currentdc))
dcText = tr("Planned dive");
else if (dcText == "manually added dive")
else if (is_dc_manually_added_dive(currentdc))
dcText = tr("Manually added dive");
else if (dcText.isEmpty())
dcText = tr("Unknown dive computer");