mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
profile: don't use displayed_dive to check whether dive changed
The profile replots if the mode of the currently displayed dive changed. To do so, it compares the changed dive to the displayed_dive. However, that is only used for planned dives since quite some time. Fix the check and make the replotting work again. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3abb82bfd5
commit
24926f6031
1 changed files with 1 additions and 3 deletions
|
@ -246,9 +246,7 @@ void ProfileWidget2::divesChanged(const QVector<dive *> &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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue