Dive list: remove rememberSelection() without restoreSelection()

Remove three cases of rememberSelection() which did not possess
the corresponding restoreSelection() twins.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-28 14:41:38 +01:00 committed by Dirk Hohndel
parent 323a71941d
commit f8768e40b4

View file

@ -780,7 +780,6 @@ void DiveListView::newTripAbove()
return; return;
//TODO: port to c-code. //TODO: port to c-code.
int idx; int idx;
rememberSelection();
QVector<dive *> dives; QVector<dive *> dives;
for_each_dive (idx, d) { for_each_dive (idx, d) {
if (d->selected) if (d->selected)
@ -820,8 +819,6 @@ void DiveListView::addToTrip(int delta)
// no dive, no trip? get me out of here // no dive, no trip? get me out of here
return; return;
rememberSelection();
QVector<dive *> dives; QVector<dive *> dives;
if (d->selected) { // there are possibly other selected dives that we should add if (d->selected) { // there are possibly other selected dives that we should add
int idx; int idx;
@ -850,8 +847,6 @@ void DiveListView::markDiveInvalid()
MainWindow::instance()->refreshDisplay(); MainWindow::instance()->refreshDisplay();
if (prefs.display_invalid_dives == false) { if (prefs.display_invalid_dives == false) {
clearSelection(); clearSelection();
// select top dive that isn't marked invalid
rememberSelection();
} }
} }