diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-21 18:29:23 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-21 18:29:23 -0700 |
commit | 1752257fbb527fb09fa34e83be4a59caddc95cd2 (patch) | |
tree | 23f9cb03a9d80e63915f5c603bf677a1c36059be /qt-ui/mainwindow.cpp | |
parent | ace8b4f2ea9835bc63597f07d0740d0b7bfc434d (diff) | |
download | subsurface-1752257fbb527fb09fa34e83be4a59caddc95cd2.tar.gz |
Correctly restore the column sizes in the dive list
Ordering here is important - we can't resize the columns before they are
created. On the other hand this now means that we explicitly need to
expand to the first dive shown.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 30629ce95..6ed810adb 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -37,7 +37,6 @@ MainWindow* mainWindow() MainWindow::MainWindow() : ui(new Ui::MainWindow()) { ui->setupUi(this); - readSettings(); setWindowIcon(QIcon(":subsurface-icon")); connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int))); ui->globeMessage->hide(); @@ -45,6 +44,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()) ui->globeMessage->setCloseButtonVisible(false); ui->ProfileWidget->setFocusProxy(ui->ListWidget); ui->ListWidget->reload(); + readSettings(); ui->ListWidget->setFocus(); ui->globe->reload(); instance = this; @@ -344,6 +344,7 @@ void MainWindow::readSettings() ui->ListWidget->resizeColumnToContents(i); } ui->ListWidget->collapseAll(); + ui->ListWidget->expand(ui->ListWidget->model()->index(0,0)); ui->ListWidget->scrollTo(ui->ListWidget->model()->index(0,0), QAbstractItemView::PositionAtCenter); settings.endGroup(); |