mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Fix showing all columns by default on first run.
Some columns are a nice addition, but not a must have, and thus are hidden-by-default, uncluttering the user interface. This was discussed with a few designers before writting the code, and also discussed with dirk on irc. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
		
							parent
							
								
									30bee57b60
								
							
						
					
					
						commit
						3c97cc5b6a
					
				
					 1 changed files with 10 additions and 1 deletions
				
			
		|  | @ -192,7 +192,16 @@ void DiveListView::reloadHeaderActions() | |||
| 			QString title = QString("%1").arg(model()->headerData(i, Qt::Horizontal).toString()); | ||||
| 			QString settingName = QString("showColumn%1").arg(i); | ||||
| 			QAction *a = new QAction(title, header()); | ||||
| 			bool shown = s.value(settingName, true).toBool(); | ||||
| 			bool showHeaderFirstRun = !( | ||||
| 				i == DiveTripModel::MAXCNS | ||||
| 				|| i == DiveTripModel::NITROX | ||||
| 				|| i == DiveTripModel::OTU | ||||
| 				|| i == DiveTripModel::TEMPERATURE | ||||
| 				|| i == DiveTripModel::TOTALWEIGHT | ||||
| 				|| i == DiveTripModel::SUIT | ||||
| 				|| i == DiveTripModel::CYLINDER | ||||
| 				|| i == DiveTripModel::SAC ); | ||||
| 			bool shown = s.value(settingName, showHeaderFirstRun).toBool(); | ||||
| 			a->setCheckable(true); | ||||
| 			a->setChecked(shown); | ||||
| 			a->setProperty("index", i); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue