desktop: don't select current dive after collapsing trips

This appears to be an artifact. Collapsing does not unselect
the current dive, so reselecting it appears pointless.
Also it is unclear why the selection should be restricted to
a single dive after collapsing.

Probably that was originally meant to expand only the trip
with the current dive in it?

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-04-25 15:14:25 +02:00 committed by Dirk Hohndel
parent b6aad78dab
commit c00737eb23

View file

@ -945,7 +945,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
QAction *actionTaken = popup.exec(event->globalPos());
if (actionTaken == collapseAction && collapseAction) {
this->setAnimated(false);
selectDive(get_divenr(current_dive), true);
scrollTo(selectedIndexes().first());
this->setAnimated(true);
}