diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-15 10:51:39 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-15 11:13:31 -0800 |
commit | 1e63579cc6b83e3c89ea4232148119ec3e703bbe (patch) | |
tree | 0ac713dbc8d887cfd398012dccfc2e95f0fe3e50 /qt-ui/divelistview.cpp | |
parent | 6bf12bde03c4d21a319fe1d2d63c7f6b010b4992 (diff) | |
download | subsurface-1e63579cc6b83e3c89ea4232148119ec3e703bbe.tar.gz |
Fix the sentense 'collapse' to 'collapse others' and scroll to it.
This patch changes the string 'collapse' to a more meaningfull
'collapse others', it also scrolls the view to the first selec
ted index, since after collapsing the others, things could be
in the wrong position.,
Fixes #233
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index e750e72aa..89ee6a6e7 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -536,7 +536,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) if (currentLayout == DiveTripModel::TREE) { popup.addAction(tr("expand all"), this, SLOT(expandAll())); popup.addAction(tr("collapse all"), this, SLOT(collapseAll())); - collapseAction = popup.addAction(tr("collapse"), this, SLOT(collapseAll())); + collapseAction = popup.addAction(tr("collapse others"), this, SLOT(collapseAll())); if (d) { popup.addAction(tr("remove dive(s) from trip"), this, SLOT(removeFromTrip())); popup.addAction(tr("create new trip above"), this, SLOT(newTripAbove())); @@ -560,6 +560,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) if (actionTaken == collapseAction && collapseAction) { this->setAnimated(false); selectDive(current_dive, true); + scrollTo(selectedIndexes().first()); this->setAnimated(true); } event->accept(); |