mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 15:24:57 +00:00
GTableView and friends: API improvements for 'Sortable' flag.
This commit is contained in:
parent
405d7ddec8
commit
6228e18a09
3 changed files with 4 additions and 3 deletions
|
@ -159,7 +159,7 @@ void GTableView::mousedown_event(GMouseEvent& event)
|
|||
}
|
||||
auto header_rect = this->header_rect(i);
|
||||
auto column_metadata = model()->column_metadata(i);
|
||||
if (header_rect.contains(event.position()) && column_metadata.sortable) {
|
||||
if (header_rect.contains(event.position()) && column_metadata.sortable == GModel::ColumnMetadata::Sortable::True) {
|
||||
auto new_sort_order = GSortOrder::Ascending;
|
||||
if (model()->key_column() == i)
|
||||
new_sort_order = model()->sort_order() == GSortOrder::Ascending
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue