summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-12 12:27:10 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-03 14:47:49 -0700
commit2829909376a853cc8a304159d7bc02cae1e19316 (patch)
treead70e8141ca22af7ef9ae7c2bf380adf13b89dcf /desktop-widgets
parentd520ac22864fed77f44de9461c3bb5302b22e30f (diff)
downloadsubsurface-2829909376a853cc8a304159d7bc02cae1e19316.tar.gz
profile: remove outside callers of ProfileWidget2::replot()
There was a mix of ProfileWidget2::replot() and ProfileWidget2::plotDive(current_dive, true), which is equivalent. Since there was more of the latter and it is more flexible, unify on that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveInformation.cpp2
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
index 8a6739627..6d3d234d6 100644
--- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
@@ -350,7 +350,7 @@ void TabDiveInformation::divesChanged(const QVector<dive *> &dives, DiveField fi
// TODO: The profile should recognize itself when the dive mode changed.
// It seem awkward to route this via the dive-information tab.
if (replot)
- MainWindow::instance()->graphics->replot();
+ MainWindow::instance()->graphics->plotDive(current_dive, true);
}
void TabDiveInformation::on_visibility_valueChanged(int value)
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index bf277d74d..00f9d6ad4 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -511,7 +511,7 @@ void MainTab::acceptChanges()
if (editMode) {
MainWindow::instance()->diveList->reload();
MainWindow::instance()->refreshDisplay();
- MainWindow::instance()->graphics->replot();
+ MainWindow::instance()->graphics->plotDive(current_dive, true);
} else {
MainWindow::instance()->refreshDisplay();
}
@@ -547,7 +547,7 @@ void MainTab::rejectChanges()
updateDiveInfo();
// show the profile and dive info
- MainWindow::instance()->graphics->replot();
+ MainWindow::instance()->graphics->plotDive(current_dive, true);
MainWindow::instance()->setEnabledToolbar(true);
ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
}