mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Code Cleanup ( that fix 2 bugs )
This code cleanup fixes the two issues that I raised on my last e-mail. hurrah. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b6bbfdcc5f
commit
24c5b2e3c1
5 changed files with 18 additions and 49 deletions
|
@ -209,6 +209,13 @@ void ProfileWidget2::setupItemOnScene()
|
|||
heartBeatAxis->setLinesVisible(true);
|
||||
}
|
||||
|
||||
void ProfileWidget2::replot()
|
||||
{
|
||||
int diveId = dataModel->id();
|
||||
dataModel->clear();
|
||||
plotDives(QList<dive *>() << getDiveById(diveId));
|
||||
}
|
||||
|
||||
void ProfileWidget2::setupItemSizes()
|
||||
{
|
||||
// Scene is *always* (double) 100 / 100.
|
||||
|
@ -431,9 +438,7 @@ void ProfileWidget2::settingsChanged()
|
|||
}
|
||||
if (s.value("zoomed_plot").toBool() != isPlotZoomed) {
|
||||
isPlotZoomed = s.value("zoomed_plot").toBool();
|
||||
int diveId = dataModel->id();
|
||||
dataModel->clear();
|
||||
plotDives(QList<dive *>() << getDiveById(diveId));
|
||||
replot();
|
||||
}
|
||||
|
||||
if (currentState == PROFILE) {
|
||||
|
@ -681,8 +686,5 @@ void ProfileWidget2::changeGas()
|
|||
fixup_dive(d);
|
||||
MainWindow::instance()->information()->updateDiveInfo(selected_dive);
|
||||
mark_divelist_changed(true);
|
||||
// force the redraw of the dive.
|
||||
//TODO: find a way to make this do not need a full redraw
|
||||
dataModel->clear();
|
||||
plotDives(QList<dive *>() << getDiveById(diveId));
|
||||
replot();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue