From e418bdf95b04b8c9e7528dd5c554e91c4245d092 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 26 Aug 2020 14:16:08 +0200 Subject: [PATCH] LibGUI: Don't update key column when clicking vertical headers Vertical headers are only concerned with rows, after all. --- Libraries/LibGUI/HeaderView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGUI/HeaderView.cpp b/Libraries/LibGUI/HeaderView.cpp index a9ddca5581..c264b0661b 100644 --- a/Libraries/LibGUI/HeaderView.cpp +++ b/Libraries/LibGUI/HeaderView.cpp @@ -202,7 +202,7 @@ void HeaderView::mouseup_event(MouseEvent& event) return; } if (m_pressed_section != -1) { - if (section_rect(m_pressed_section).contains(event.position())) { + if (m_orientation == Gfx::Orientation::Horizontal && section_rect(m_pressed_section).contains(event.position())) { auto new_sort_order = SortOrder::Ascending; if (m_table_view.key_column() == m_pressed_section) new_sort_order = m_table_view.sort_order() == SortOrder::Ascending