mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 21:30:58 +00:00 
			
		
		
		
	FileManager: Hook up a GSortingProxyTableModel so we get sorted files. :^)
The next step here is coming up with a nice way to always put directories ahead of files.
This commit is contained in:
		
							parent
							
								
									7d2c962836
								
							
						
					
					
						commit
						e14dd06b8c
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 15:06:43 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: e14dd06b8c
			
					 4 changed files with 25 additions and 10 deletions
				
			
		|  | @ -28,14 +28,10 @@ int GSortingProxyTableModel::column_count() const | |||
| GModelIndex GSortingProxyTableModel::map_to_target(const GModelIndex& index) const | ||||
| { | ||||
|     ASSERT(!m_row_mappings.is_empty()); | ||||
|     if (!index.is_valid()) { | ||||
|         ASSERT_NOT_REACHED(); | ||||
|     if (!index.is_valid()) | ||||
|         return { }; | ||||
|     } | ||||
|     if (index.row() >= row_count() || index.column() >= column_count()) { | ||||
|         ASSERT_NOT_REACHED(); | ||||
|     if (index.row() >= row_count() || index.column() >= column_count()) | ||||
|         return { }; | ||||
|     } | ||||
|     return { m_row_mappings[index.row()], index.column() }; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling