mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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("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 all" really closes all trips,
|
||||||
// "collapse" keeps the trip with the selected dive open
|
// "collapse" keeps the trip with the selected dive open
|
||||||
QAction * actionTaken = popup.exec(event->globalPos());
|
QAction * actionTaken = popup.exec(event->globalPos());
|
||||||
|
|
Loading…
Add table
Reference in a new issue