mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:03:23 +00:00
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:
parent
99922722d2
commit
f6f2c4e929
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -761,10 +761,9 @@ void MainTab::acceptChanges()
|
|||
editMode = NONE;
|
||||
MainWindow::instance()->dive_list()->rememberSelection();
|
||||
sort_table(&dive_table);
|
||||
MainWindow::instance()->refreshDisplay();
|
||||
MainWindow::instance()->refreshDisplay(false);
|
||||
MainWindow::instance()->dive_list()->restoreSelection();
|
||||
}
|
||||
updateDiveInfo();
|
||||
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING);
|
||||
MainWindow::instance()->dive_list()->verticalScrollBar()->setSliderPosition(scrolledBy);
|
||||
MainWindow::instance()->dive_list()->setFocus();
|
||||
|
|
Loading…
Add table
Reference in a new issue