mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:13:23 +00:00
Distinguish between "collapse" and "collapse all"
Some users might want to really see nothing but trips, others might want to be able to keep the trip with the selected dive open. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
74d23ed83b
commit
582253fe88
1 changed files with 5 additions and 2 deletions
|
@ -282,7 +282,10 @@ void DiveListView::mousePressEvent(QMouseEvent *event)
|
|||
}
|
||||
QMenu popup(this);
|
||||
popup.addAction(tr("expand all"), this, SLOT(expandAll()));
|
||||
QAction *collapseAllAction = popup.addAction(tr("collapse all"), this, SLOT(collapseAll()));
|
||||
if (popup.exec(event->globalPos()) == collapseAllAction)
|
||||
popup.addAction(tr("collapse all"), this, SLOT(collapseAll()));
|
||||
QAction *collapseAction = popup.addAction(tr("collapse"), this, SLOT(collapseAll()));
|
||||
// "collapse all" really closes all trips,
|
||||
// "collaps" keeps the trip with the selected dive open
|
||||
if (popup.exec(event->globalPos()) == collapseAction)
|
||||
selectDive(current_dive, true);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue