aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-15 18:13:20 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-17 06:16:35 +0700
commit793879b6fab658c19bce92bebe0e193a900a2cc5 (patch)
treec3f6273ae7fa048abc47a58f8006476292fb491f /qt-ui/mainwindow.cpp
parent6f5974f3e824a62f3cbbe197f7dc1cc320a1da4f (diff)
downloadsubsurface-793879b6fab658c19bce92bebe0e193a900a2cc5.tar.gz
The plot-profile method was being called too many times.
There was a bug in the old implementation where we needed to trigger a repaint of the profile almost everywhere. this isn't needed anymore on the new one, so do not use the same method that will be killed when I finish this.e Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index d2b208ed0..4330636ed 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -91,18 +91,19 @@ void MainWindow::current_dive_changed(int divenr)
ui.globe->centerOn(get_dive(selected_dive));
}
redrawProfile();
- ui.InfoWidget->updateDiveInfo(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<dive*>() << (current_dive) );
+ ui.InfoWidget->updateDiveInfo(divenr);
+}
+
+void MainWindow::redrawProfile()
+{
+ ui.ProfileWidget->refresh();
}
void MainWindow::on_actionNew_triggered()