diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-06-14 07:13:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-14 07:13:06 -0700 |
commit | 8669de63e137aa873a8cf843ad79fffaee0afa40 (patch) | |
tree | 6436f829a208110ac97c137ec4761a375d2f6b1f /qt-ui/divelistview.cpp | |
parent | d8c5f366c81b5e94fa1931cd994c97d5ec493a75 (diff) | |
download | subsurface-8669de63e137aa873a8cf843ad79fffaee0afa40.tar.gz |
Don't offer "delete dive" context menu for trip
If we are not on a dive we shouldn't try to delete it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 980939355..12243f468 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -340,7 +340,8 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) popup.addAction(tr("remove dive from trip"), this, SLOT(removeFromTrip())); } } - popup.addAction(tr("delete dive"), this, SLOT(deleteDive())); + if (d) + popup.addAction(tr("delete dive"), this, SLOT(deleteDive())); // "collapse all" really closes all trips, // "collapse" keeps the trip with the selected dive open QAction * actionTaken = popup.exec(event->globalPos()); |