From 8627f6fc4af2a213f0231b9708406ed1d364ce44 Mon Sep 17 00:00:00 2001 From: =Michael Keller Date: Wed, 8 May 2024 23:35:52 +1200 Subject: [PATCH] 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 --- desktop-widgets/tab-widgets/TabDiveExtraInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop-widgets/tab-widgets/TabDiveExtraInfo.cpp b/desktop-widgets/tab-widgets/TabDiveExtraInfo.cpp index 203f34864..edc8455d8 100644 --- a/desktop-widgets/tab-widgets/TabDiveExtraInfo.cpp +++ b/desktop-widgets/tab-widgets/TabDiveExtraInfo.cpp @@ -24,6 +24,10 @@ void TabDiveExtraInfo::updateData(const std::vector &, dive *currentDive const struct divecomputer *currentdc = get_dive_dc(currentDive, currentDC); if (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()