Only repopulate the dive info once ( we were repopulating 4 times )

This makes the screen repopulate itself after a dive change only
one time instead of the old 4. we were repopulateing when we
removed the actual selection to reset the old selection previously
stored, sigh.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-07-21 20:44:46 -03:00 committed by Dirk Hohndel
parent 99922722d2
commit f6f2c4e929
2 changed files with 3 additions and 2 deletions

View file

@ -156,7 +156,9 @@ void DiveListView::restoreSelection()
return;
selectionSaved = false;
dontEmitDiveChangedSignal = true;
unselectDives();
dontEmitDiveChangedSignal = false;
Q_FOREACH (dive_trip_t *trip, selectedDives.keys()) {
QList<int> divesOnTrip = getDivesInTrip(trip);
QList<int> selectedDivesOnTrip = selectedDives.values(trip);