mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibGUI: Respect the previously selected sort order in HeaderView (#3522)
Instead of forcefully setting the sort order to Ascending upon column sort, setting it to the previously selected sort order
This commit is contained in:
parent
219c0fbea9
commit
d7673b41ef
Notes:
sideshowbarker
2024-07-19 02:22:03 +09:00
Author: https://github.com/umasankar-yedida
Commit: d7673b41ef
Pull-request: https://github.com/SerenityOS/serenity/pull/3522
1 changed files with 1 additions and 1 deletions
|
@ -206,7 +206,7 @@ void HeaderView::mouseup_event(MouseEvent& event)
|
|||
}
|
||||
if (m_pressed_section != -1) {
|
||||
if (m_orientation == Gfx::Orientation::Horizontal && section_rect(m_pressed_section).contains(event.position())) {
|
||||
auto new_sort_order = SortOrder::Ascending;
|
||||
auto new_sort_order = m_table_view.sort_order();
|
||||
if (m_table_view.key_column() == m_pressed_section)
|
||||
new_sort_order = m_table_view.sort_order() == SortOrder::Ascending
|
||||
? SortOrder::Descending
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue