mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:02:46 +00:00 
			
		
		
		
	GModel: Remove selected_index() and set_selected_index()
This breaks GSortingProxyModel selection preservation across resorts. I'm not yet sure how we're going to solve that, but it's going to have to work a bit differently than before, since the model itself no longer knows what's selected. Selection is now managed by GModelSelection which allows us to select any arbitrary number of items, and to have different selections in different views onto the same model. Pretty sweet. :^)
This commit is contained in:
		
							parent
							
								
									6dec328af7
								
							
						
					
					
						commit
						2f5b2685af
					
				
					 3 changed files with 0 additions and 28 deletions
				
			
		|  | @ -57,9 +57,6 @@ public: | |||
|         return index.row() >= 0 && index.row() < row_count() && index.column() >= 0 && index.column() < column_count(); | ||||
|     } | ||||
| 
 | ||||
|     void set_selected_index(const GModelIndex&); | ||||
|     GModelIndex selected_index() const { return m_selected_index; } | ||||
| 
 | ||||
|     virtual int key_column() const { return -1; } | ||||
|     virtual GSortOrder sort_order() const { return GSortOrder::None; } | ||||
|     virtual void set_key_column_and_sort_order(int, GSortOrder) {} | ||||
|  | @ -80,7 +77,6 @@ protected: | |||
| 
 | ||||
| private: | ||||
|     HashTable<GAbstractView*> m_views; | ||||
|     GModelIndex m_selected_index; | ||||
| }; | ||||
| 
 | ||||
| inline GModelIndex GModelIndex::parent() const | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling