mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 07:53:25 +00:00
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>
This commit is contained in:
parent
d520ac2286
commit
2829909376
2 changed files with 3 additions and 3 deletions
|
@ -350,7 +350,7 @@ void TabDiveInformation::divesChanged(const QVector<dive *> &dives, DiveField fi
|
||||||
// TODO: The profile should recognize itself when the dive mode changed.
|
// TODO: The profile should recognize itself when the dive mode changed.
|
||||||
// It seem awkward to route this via the dive-information tab.
|
// It seem awkward to route this via the dive-information tab.
|
||||||
if (replot)
|
if (replot)
|
||||||
MainWindow::instance()->graphics->replot();
|
MainWindow::instance()->graphics->plotDive(current_dive, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabDiveInformation::on_visibility_valueChanged(int value)
|
void TabDiveInformation::on_visibility_valueChanged(int value)
|
||||||
|
|
|
@ -511,7 +511,7 @@ void MainTab::acceptChanges()
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
MainWindow::instance()->diveList->reload();
|
MainWindow::instance()->diveList->reload();
|
||||||
MainWindow::instance()->refreshDisplay();
|
MainWindow::instance()->refreshDisplay();
|
||||||
MainWindow::instance()->graphics->replot();
|
MainWindow::instance()->graphics->plotDive(current_dive, true);
|
||||||
} else {
|
} else {
|
||||||
MainWindow::instance()->refreshDisplay();
|
MainWindow::instance()->refreshDisplay();
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ void MainTab::rejectChanges()
|
||||||
updateDiveInfo();
|
updateDiveInfo();
|
||||||
|
|
||||||
// show the profile and dive info
|
// show the profile and dive info
|
||||||
MainWindow::instance()->graphics->replot();
|
MainWindow::instance()->graphics->plotDive(current_dive, true);
|
||||||
MainWindow::instance()->setEnabledToolbar(true);
|
MainWindow::instance()->setEnabledToolbar(true);
|
||||||
ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
|
ui.editDiveSiteButton->setEnabled(!ui.location->text().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue