diff options
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 9221ff293..3b932144b 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -559,7 +559,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force, bool doClearPictures) #endif if (currentState != ADD && currentState != PLAN) { if (!d) { - if (selected_dive == -1) + if (!current_dive) return; d = current_dive; // display the current dive } @@ -1413,7 +1413,7 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event) } QMenu m; bool isDCName = false; - if (selected_dive == -1) + if (!current_dive) return; // figure out if we are ontop of the dive computer name in the profile QGraphicsItem *sceneItem = itemAt(mapFromGlobal(event->globalPos())); |