diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 549aa982e..89d1b2840 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -246,9 +246,7 @@ void ProfileWidget2::divesChanged(const QVector &dives, DiveField field) { // If the mode of the currently displayed dive changed, replot if (field.mode && - std::any_of(dives.begin(), dives.end(), - [id = displayed_dive.id] (const dive *d) - { return d->id == id; } )) + std::find(dives.begin(), dives.end(), d) != dives.end()) replot(); }