summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-07-21 20:44:46 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-23 08:10:10 -0700
commitf6f2c4e929fd6da77c83b50f60720f3c04c8c107 (patch)
treeab437d12be3238771dc757b80397d97f8d078686 /qt-ui
parent99922722d29d1e4e772580d14f6710726e324496 (diff)
downloadsubsurface-f6f2c4e929fd6da77c83b50f60720f3c04c8c107.tar.gz
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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelistview.cpp2
-rw-r--r--qt-ui/maintab.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 5fde4c45f..442ea1fb7 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -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);
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 87d2a1beb..95143ed11 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -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();