diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-16 18:41:47 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-16 20:19:55 -0800 |
commit | 4f9526ef8122f3496ee0ead986fcc10c500e0584 (patch) | |
tree | 29c6c838928c03bb47a404f3ff0c889a25bc7869 /qt-ui/maintab.cpp | |
parent | c1a05fd03443ac9604684fa22a7efd5172bd2ffc (diff) | |
download | subsurface-4f9526ef8122f3496ee0ead986fcc10c500e0584.tar.gz |
Fix wrong handling of Dive Table, and revert some wrong changes.
This patch just reverts some wrong changes that I'v done on a
past commit ( sorry ) and correctly handles the selectDive,
by using a IDX instead of the dive pointer, as dirk told me
it's extremely error-prone since the pointer can change.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 970f90a2f..60b4add3a 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -511,7 +511,7 @@ void MainTab::acceptChanges() // unselectDives() doesn't mess with the dive_table at all struct dive *addedDive = current_dive; mainWindow()->dive_list()->unselectDives(); - mainWindow()->dive_list()->selectDive(addedDive, true, true); + mainWindow()->dive_list()->selectDive(selected_dive, true, true); mainWindow()->showProfile(); mark_divelist_changed(TRUE); DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); |