mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user