mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
selection: pass down selection to tab widgets
On selection change, pass down selection (including current dive and dc) to the tab widgets. Ultimately, this should remove access to global variables. A number of new accesses are marked as TODO. They shall be removed in due course. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
908da77863
commit
cded7ef5fe
16 changed files with 62 additions and 55 deletions
|
|
@ -137,13 +137,13 @@ void TabDiveEquipment::toggleTriggeredColumn()
|
|||
}
|
||||
}
|
||||
|
||||
void TabDiveEquipment::updateData()
|
||||
void TabDiveEquipment::updateData(const std::vector<dive *> &, dive *currentDive, int currentDC)
|
||||
{
|
||||
cylindersModel->updateDive(current_dive, dc_number);
|
||||
weightModel->updateDive(current_dive);
|
||||
cylindersModel->updateDive(currentDive, currentDC);
|
||||
weightModel->updateDive(currentDive);
|
||||
|
||||
if (current_dive && current_dive->suit)
|
||||
ui.suit->setText(QString(current_dive->suit));
|
||||
if (currentDive && currentDive->suit)
|
||||
ui.suit->setText(QString(currentDive->suit));
|
||||
else
|
||||
ui.suit->clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue