Desktop: Add Auto-sizing to the Extra Info Table.

Add auto-sizing to the extra info table - resize the columns so that all
rows are shown in full whenever the data is updated.

Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
=Michael Keller 2024-05-08 23:35:52 +12:00 committed by Dirk Hohndel
parent 5bad522390
commit 8627f6fc4a

View file

@ -24,6 +24,10 @@ void TabDiveExtraInfo::updateData(const std::vector<dive *> &, dive *currentDive
const struct divecomputer *currentdc = get_dive_dc(currentDive, currentDC); const struct divecomputer *currentdc = get_dive_dc(currentDive, currentDC);
if (currentdc) if (currentdc)
extraDataModel->updateDiveComputer(currentdc); extraDataModel->updateDiveComputer(currentdc);
ui->extraData->setVisible(false); // This will cause the resize to include rows outside the current viewport
ui->extraData->resizeColumnsToContents();
ui->extraData->setVisible(true);
} }
void TabDiveExtraInfo::clear() void TabDiveExtraInfo::clear()