mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move get_dive_dc() to struct dive
Feels natural in a C++ code base. This removes a nullptr-check so some care has to be taken. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
731052c776
commit
f1f082d86a
15 changed files with 59 additions and 55 deletions
|
@ -21,9 +21,8 @@ TabDiveExtraInfo::~TabDiveExtraInfo()
|
|||
|
||||
void TabDiveExtraInfo::updateData(const std::vector<dive *> &, dive *currentDive, int currentDC)
|
||||
{
|
||||
const struct divecomputer *currentdc = get_dive_dc(currentDive, currentDC);
|
||||
if (currentdc)
|
||||
extraDataModel->updateDiveComputer(currentdc);
|
||||
if (currentDive)
|
||||
extraDataModel->updateDiveComputer(currentDive->get_dc(currentDC));
|
||||
|
||||
ui->extraData->setVisible(false); // This will cause the resize to include rows outside the current viewport
|
||||
ui->extraData->resizeColumnsToContents();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue