summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI
diff options
context:
space:
mode:
authorUma Sankar <dcmeumasankar@gmail.com>2020-09-17 19:45:35 +0530
committerGitHub <noreply@github.com>2020-09-17 16:15:35 +0200
commitd7673b41ef3891f82faa3b4a748b2e6418cb8f7a (patch)
treec41138737e4e42f5798ee0428c94e8bddddfcff3 /Libraries/LibGUI
parent219c0fbea9d344bc9c7fff28f5a6a4c025de9a91 (diff)
downloadserenity-d7673b41ef3891f82faa3b4a748b2e6418cb8f7a.zip
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
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r--Libraries/LibGUI/HeaderView.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/HeaderView.cpp b/Libraries/LibGUI/HeaderView.cpp
index 5cf313e7d7..f77a2ec402 100644
--- a/Libraries/LibGUI/HeaderView.cpp
+++ b/Libraries/LibGUI/HeaderView.cpp
@@ -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