summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-02 12:03:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-02 12:03:40 -0700
commit91086d08ad77b693c7fd1440f9403f84acae0794 (patch)
tree08d3785fa19a97572044d1d3c3d5c92ce65c4c08 /qt-ui/mainwindow.cpp
parenta221a6e9f5ff7a9460beaa0fbb4da53e5616eca1 (diff)
downloadsubsurface-91086d08ad77b693c7fd1440f9403f84acae0794.tar.gz
UI restructure: plotDive should just take one dive
We don't have a concept of what to do when plotting multiple dives, so let's not pretend and remove all the messing around with lists. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e5bfdd08b..c961ff8e2 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -175,13 +175,7 @@ void MainWindow::current_dive_changed(int divenr)
select_dive(divenr);
ui.globe->centerOnCurrentDive();
}
-
- /* It looks like it's a bit too cumberstone to send *one* dive using a QList,
- * but this is just futureproofness, it's the best way in the future to show more than
- * a single profile plot on the canvas. I know that we are using only one right now,
- * but let's keep like this so it's easy to change when we need? :)
- */
- ui.newProfile->plotDives(QList<dive *>() << (current_dive));
+ ui.newProfile->plotDive(current_dive);
ui.InfoWidget->updateDiveInfo(divenr);
}
@@ -656,16 +650,16 @@ void MainWindow::on_actionPreviousDC_triggered()
{
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + nrdc - 1) % nrdc;
+ ui.newProfile->plotDive(current_dive);
ui.InfoWidget->updateDiveInfo(selected_dive);
- ui.newProfile->plotDives(QList<struct dive *>() << (current_dive));
}
void MainWindow::on_actionNextDC_triggered()
{
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + 1) % nrdc;
+ ui.newProfile->plotDive(current_dive);
ui.InfoWidget->updateDiveInfo(selected_dive);
- ui.newProfile->plotDives(QList<struct dive *>() << (current_dive));
}
void MainWindow::on_actionFullScreen_triggered(bool checked)