diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-12-17 23:45:48 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-20 11:02:17 -0800 |
commit | 196bd7b7b247d8ac53574d4ab15ed25e66f92bc6 (patch) | |
tree | 4adaf1dfa1815863efe5ce07e60150f44fab0952 /profile-widget/profilewidget2.h | |
parent | 5979292469de934b1af0612b0beb3bcbb4901dd3 (diff) | |
download | subsurface-196bd7b7b247d8ac53574d4ab15ed25e66f92bc6.tar.gz |
profile: remove clearHandlers function (fixes crash)
Recently (674c20227b2), the call to ProfileWidget::clearHandlers()
was moved from PlannerWidgets::replanDive() to ProfileWidget2.
This cause a crash, because the code assumes that the number
of elements in the handles-vector the divepointplanner model
is the same.
Clearing the handles violates this assumption. It turns out
that the clearHandlers() function is broken anyway: it clear
the handles-vector, but not the gases-vector, which should
likewise have the same number of elements. It appears that
the clearHandlers() function is an artifact and it is
mysterious how this has worked so far. Remove.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.h')
-rw-r--r-- | profile-widget/profilewidget2.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index 272398095..4c6d66898 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -163,9 +163,6 @@ private: void createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert, const double *thresholdSettingsMin, const double *thresholdSettingsMax); void clearPictures(); -#ifndef SUBSURFACE_MOBILE - void clearHandlers(); -#endif void plotPicturesInternal(const struct dive *d, bool synchronous); void addDivemodeSwitch(int seconds, int divemode); void addBookmark(int seconds); |