mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
6bf12bde03
commit
1e63579cc6
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue