diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-03 11:55:22 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-03 12:49:58 -0700 |
commit | 0a19a964e09e31016b39ee2d65f6220b01c49dcb (patch) | |
tree | d76da123b8874e225a7ef45524a3eebd918cb413 /qt-ui/mainwindow.cpp | |
parent | 8577410fcd94f3c3109b8b3cf4932a9e0d11fc80 (diff) | |
download | subsurface-0a19a964e09e31016b39ee2d65f6220b01c49dcb.tar.gz |
Temporarily expand all dives so the automatic width calculation works
Suggested-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index bd202b24f..aac829ef1 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -314,6 +314,9 @@ void MainWindow::readSettings() settings.endGroup(); settings.beginGroup("ListWidget"); + /* if no width are set, use the calculated width for each column; + * for that to work we need to temporarily expand all rows */ + ui->ListWidget->expandAll(); for (i = TreeItemDT::NR; i < TreeItemDT::COLUMNS; i++) { QVariant width = settings.value(QString("colwidth%1").arg(i)); if (width.isValid()) @@ -321,6 +324,7 @@ void MainWindow::readSettings() else ui->ListWidget->resizeColumnToContents(i); } + ui->ListWidget->collapseAll(); settings.endGroup(); } |