mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
d8c5f366c8
commit
8669de63e1
1 changed files with 2 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue