mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
Much easier way to detect if more than one dive is selected
Instead of getting data from Qt just use our internal notion of the number of selected dive to decide if more than one dive is selected (and therefore if we need to show the 'merge dives' option in the context menu). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
023476a4a6
commit
2d40172d78
1 changed files with 1 additions and 1 deletions
|
@ -400,7 +400,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
|||
}
|
||||
if (d)
|
||||
popup.addAction(tr("delete dive"), this, SLOT(deleteDive()));
|
||||
if (selectionModel()->selection().indexes().count() > 14)
|
||||
if (amount_selected > 1)
|
||||
popup.addAction(tr("merge selected dives"), this, SLOT(mergeDives()));
|
||||
// "collapse all" really closes all trips,
|
||||
// "collapse" keeps the trip with the selected dive open
|
||||
|
|
Loading…
Reference in a new issue