mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix colum visibility selection in the divelist
Several changes: - split the reload of the DiveListView from the reload of the header - don't include the column title in the name of the setting; the title will change depending on the units and localization chosen by the user - rename the slot that toggles visibility to make the code more readable - use setCollumHidden() method to simplify the code - don't save the width of hidden columns (as they would be saved as zero width and can then no longer be enabled) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2896dbdaf1
commit
43892e36fd
3 changed files with 19 additions and 17 deletions
|
@ -44,6 +44,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow())
|
|||
ui->ProfileWidget->setFocusProxy(ui->ListWidget);
|
||||
ui->ListWidget->reload();
|
||||
readSettings();
|
||||
ui->ListWidget->reloadHeaderActions();
|
||||
ui->ListWidget->setFocus();
|
||||
ui->globe->reload();
|
||||
instance = this;
|
||||
|
@ -432,7 +433,8 @@ void MainWindow::writeSettings()
|
|||
|
||||
settings.beginGroup("ListWidget");
|
||||
for (i = TreeItemDT::NR; i < TreeItemDT::COLUMNS; i++)
|
||||
settings.setValue(QString("colwidth%1").arg(i), ui->ListWidget->columnWidth(i));
|
||||
if (!ui->ListWidget->isColumnHidden(i))
|
||||
settings.setValue(QString("colwidth%1").arg(i), ui->ListWidget->columnWidth(i));
|
||||
settings.endGroup();
|
||||
settings.beginGroup("Units");
|
||||
SAVE_VALUE("feet", units.length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue