mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Dive list: expand trips if dives are selected
If dives are deleted, the trip(s) containing the dives are expanded. Thus, on undo it seems natural to re-expand the trip. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									2a61664ceb
								
							
						
					
					
						commit
						b16be29595
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -197,6 +197,13 @@ void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indexes, boo | |||
| 			continue; | ||||
| 
 | ||||
| 		s->select(localIndex, flags); | ||||
| 
 | ||||
| 		// If an item of a not-yet expanded trip is selected, expand the trip.
 | ||||
| 		if (select && localIndex.parent().isValid() && !isExpanded(localIndex.parent())) { | ||||
| 			setAnimated(false); | ||||
| 			expand(localIndex.parent()); | ||||
| 			setAnimated(true); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue