mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: don't access profile directly to redraw it
The MainWindow has a function to replot the profile. Use that instead of accessing the profile directly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
64dae43bdd
commit
c584e28f2e
1 changed files with 3 additions and 3 deletions
|
@ -269,7 +269,7 @@ void MainTab::divesChanged(const QVector<dive *> &dives, DiveField field)
|
||||||
|
|
||||||
// If duration or depth changed, the profile needs to be replotted
|
// If duration or depth changed, the profile needs to be replotted
|
||||||
if (field.duration || field.depth)
|
if (field.duration || field.depth)
|
||||||
MainWindow::instance()->graphics->plotDive(current_dive, true);
|
MainWindow::instance()->refreshProfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainTab::diveSiteEdited(dive_site *ds, int)
|
void MainTab::diveSiteEdited(dive_site *ds, int)
|
||||||
|
@ -513,7 +513,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->plotDive(current_dive, true);
|
MainWindow::instance()->refreshProfile();
|
||||||
} else {
|
} else {
|
||||||
MainWindow::instance()->refreshDisplay();
|
MainWindow::instance()->refreshDisplay();
|
||||||
}
|
}
|
||||||
|
@ -549,7 +549,7 @@ void MainTab::rejectChanges()
|
||||||
updateDiveInfo();
|
updateDiveInfo();
|
||||||
|
|
||||||
// show the profile and dive info
|
// show the profile and dive info
|
||||||
MainWindow::instance()->graphics->plotDive(current_dive, true);
|
MainWindow::instance()->refreshProfile();
|
||||||
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
Add a link
Reference in a new issue