diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-12 12:20:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-03 14:47:49 -0700 |
commit | d520ac22864fed77f44de9461c3bb5302b22e30f (patch) | |
tree | fb72fcbe29e4d6acfd62f63c5b6a341d38d1f644 /profile-widget/profilewidget2.cpp | |
parent | 8f8457ebe4b01b42bdb7545b7a782f35bf207134 (diff) | |
download | subsurface-d520ac22864fed77f44de9461c3bb5302b22e30f.tar.gz |
cleanup: remove parameter to ProfleWidget2::replot()
Firstly, the parameter appears conceptually wrong, as replot suggests
that the currently shown dive is replot. Secondly, the only caller that
passed a parameter was passing in current_dive, which is just what happens
if one doesn't pass a parameter. Therefore, change that caller (call
plotDive directly) and remove the parameter.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 365f4758d..b516b1544 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -379,10 +379,10 @@ void ProfileWidget2::setupItemOnScene() gasYAxis->setZValue(timeAxis->zValue() + 1); } -void ProfileWidget2::replot(struct dive *d) +void ProfileWidget2::replot() { dataModel->clear(); - plotDive(d, true, false); + plotDive(nullptr, true, false); } void ProfileWidget2::createPPGas(PartialPressureGasItem *item, int verticalColumn, color_index_t color, color_index_t colorAlert, |