diff options
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 12 |
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; |