diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-16 21:25:31 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-05-16 21:25:31 -0300 |
commit | 2f35c940261fe0f5fdb2723072553c036492e608 (patch) | |
tree | 9d03742d09b30703a402a75cb4ad790a6cb0fac4 /qt-ui/profilegraphics.cpp | |
parent | 3024b2b83cb40bb694da08b7b51ec3112c130980 (diff) | |
download | subsurface-2f35c940261fe0f5fdb2723072553c036492e608.tar.gz |
Fix loading a dive via command line.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r-- | qt-ui/profilegraphics.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 8ab4aa845..637c7fe95 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -202,8 +202,14 @@ static void plot_set_scale(scale_mode_t scale) void ProfileGraphicsView::showEvent(QShowEvent* event) { - if (dive) - plot(dive); + // Program just opened, + // but the dive was not ploted. + // force a replot by modifying the dive + // hold by the view, and issuing a plot. + if (dive){ + dive = 0; + plot(get_dive(selected_dive)); + } } void ProfileGraphicsView::clear() |