core: don't consider dives with many samples as manually added

This causes UI confusion. Notably we go into edit mode and
reduce the number of samples, leading to loss of information.

If someone really manually adds a dive with more than 50
samples, they should still be able to explicitly open the
dive in the planner.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-10-21 00:39:30 +02:00 committed by Dirk Hohndel
parent 9ced3a3a4d
commit f687e51d4b
7 changed files with 15 additions and 8 deletions

View file

@ -192,7 +192,7 @@ void ProfileWidget::plotCurrentDive()
if (current_dive && !editedDive &&
DivePlannerPointsModel::instance()->currentMode() == DivePlannerPointsModel::NOTHING) {
struct divecomputer *dc = get_dive_dc(current_dive, dc_number);
if (dc && same_string(dc->model, "manually added dive") && dc->samples)
if (dc && is_manually_added_dc(dc) && dc->samples)
editDive();
}