aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-27 08:39:47 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-27 08:39:47 -0800
commitcc91cad89091d0212cc09e840dfde513b968f7b7 (patch)
tree7e26fff0e5088ed8fed4afe9a373795889dfa4cf /qt-ui
parent3fd39a7a87bf438f012167303a564deac72d267a (diff)
downloadsubsurface-cc91cad89091d0212cc09e840dfde513b968f7b7.tar.gz
Make sure we keep our notion of what's selected in sync with the UI
When editing a dive, a group of dives or a trip we need to make sure that we don't lose track of which dives and trips were selected. Otherwise we might act on dives that DON'T appear selected in the UI but that we think are still selected. Fixes #304 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 11d764abe..8c0f6849a 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -549,8 +549,10 @@ void MainTab::acceptChanges()
// now comes the scary moment... we need to re-sort dive table in case this dive wasn't the last
// so now all pointers become invalid
// fingers crossed that we aren't holding on to anything here
+ mainWindow()->dive_list()->rememberSelection();
sort_table(&dive_table);
mainWindow()->refreshDisplay();
+ mainWindow()->dive_list()->restoreSelection();
}
void MainTab::resetPallete()