mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ace8b4f2ea
commit
1752257fbb
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,6 @@ MainWindow* mainWindow()
|
||||||
MainWindow::MainWindow() : ui(new Ui::MainWindow())
|
MainWindow::MainWindow() : ui(new Ui::MainWindow())
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
readSettings();
|
|
||||||
setWindowIcon(QIcon(":subsurface-icon"));
|
setWindowIcon(QIcon(":subsurface-icon"));
|
||||||
connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
|
connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
|
||||||
ui->globeMessage->hide();
|
ui->globeMessage->hide();
|
||||||
|
@ -45,6 +44,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow())
|
||||||
ui->globeMessage->setCloseButtonVisible(false);
|
ui->globeMessage->setCloseButtonVisible(false);
|
||||||
ui->ProfileWidget->setFocusProxy(ui->ListWidget);
|
ui->ProfileWidget->setFocusProxy(ui->ListWidget);
|
||||||
ui->ListWidget->reload();
|
ui->ListWidget->reload();
|
||||||
|
readSettings();
|
||||||
ui->ListWidget->setFocus();
|
ui->ListWidget->setFocus();
|
||||||
ui->globe->reload();
|
ui->globe->reload();
|
||||||
instance = this;
|
instance = this;
|
||||||
|
@ -344,6 +344,7 @@ void MainWindow::readSettings()
|
||||||
ui->ListWidget->resizeColumnToContents(i);
|
ui->ListWidget->resizeColumnToContents(i);
|
||||||
}
|
}
|
||||||
ui->ListWidget->collapseAll();
|
ui->ListWidget->collapseAll();
|
||||||
|
ui->ListWidget->expand(ui->ListWidget->model()->index(0,0));
|
||||||
ui->ListWidget->scrollTo(ui->ListWidget->model()->index(0,0), QAbstractItemView::PositionAtCenter);
|
ui->ListWidget->scrollTo(ui->ListWidget->model()->index(0,0), QAbstractItemView::PositionAtCenter);
|
||||||
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
Loading…
Add table
Reference in a new issue