From 6b1b2bc919e311cc7e83f336017f35216c8da538 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 2 Jul 2014 22:38:08 -0700 Subject: 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 --- qt-ui/maintab.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qt-ui/maintab.cpp') 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(); -- cgit v1.2.3-70-g09d2