mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									8577410fcd
								
							
						
					
					
						commit
						0a19a964e0
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -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(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue