diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-06-06 06:39:54 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-06 06:39:54 +0900 |
commit | 582253fe88a6e50c416ba7e037f99f1508e48a56 (patch) | |
tree | 04d09f69097da2681ab11eb9dbba312d717369aa /qt-ui/divelistview.cpp | |
parent | 74d23ed83b0fe4a2270adc41b5a9bd20b7ca5d29 (diff) | |
download | subsurface-582253fe88a6e50c416ba7e037f99f1508e48a56.tar.gz |
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>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index d66313823..9e3ceb52e 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -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); } |