From 90fc7a23f2f61a78f81460aa0998b5681622f83f Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 15 Jan 2014 10:47:08 -0200 Subject: Pass the current selected dive to the new Profile Widget. This call just passes the selected dive to the new profile widget. No drawing is performed, I still have to setup the constructors and the rest of the initialization of the new Profile. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a7a6346ad..ad7d26a4e 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -97,6 +97,12 @@ void MainWindow::current_dive_changed(int divenr) void MainWindow::redrawProfile() { ui.ProfileWidget->refresh(); + /* 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.graphicsView->plotDives( QList() << (current_dive) ); } void MainWindow::on_actionNew_triggered() -- cgit v1.2.3-70-g09d2