summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index c01022799..c2f71be11 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -194,16 +194,26 @@ static void plot_set_scale(scale_mode_t scale)
}
}
+void ProfileGraphicsView::showEvent(QShowEvent* event)
+{
+ if (dive)
+ plot(dive);
+}
+
void ProfileGraphicsView::plot(struct dive *d)
{
- scene()->clear();
+ scene()->clear();
if (dive != d){
resetTransform();
zoomLevel = 0;
dive = d;
}
+ if(!isVisible()){
+ return;
+ }
+
if(!dive)
return;