summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-02 22:38:08 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-03 09:37:55 -0700
commit6b1b2bc919e311cc7e83f336017f35216c8da538 (patch)
treee7be0074447f2fc0f17d692c61918d99392df909 /qt-ui/maintab.cpp
parenta86aca037843167b26726926dbf2aebe0513afba (diff)
downloadsubsurface-6b1b2bc919e311cc7e83f336017f35216c8da538.tar.gz
UI restructure: get rid of "current" pointer in cylinders and weights
Instead always display the display_dive. Now the only thing left to slay is the stagingDive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index edbd7d06d..f53a70e6e 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -432,8 +432,8 @@ void MainTab::updateDiveInfo(bool clear)
ui.LocationLabel->setText(tr("Location"));
ui.NotesLabel->setText(tr("Notes"));
ui.equipmentTab->setEnabled(true);
- cylindersModel->setDive(&displayed_dive);
- weightModel->setDive(&displayed_dive);
+ cylindersModel->updateDive();
+ weightModel->updateDive();
taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
ui.tagWidget->setText(QString(buf));
}
@@ -828,8 +828,8 @@ void MainTab::rejectChanges()
}
if (selected_dive >= 0) {
copy_dive(current_dive, &displayed_dive);
- cylindersModel->setDive(&displayed_dive);
- weightModel->setDive(&displayed_dive);
+ cylindersModel->updateDive();
+ weightModel->updateDive();
} else {
cylindersModel->clear();
weightModel->clear();