1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-24 01:15:07 +00:00

LibGUI: Don't update key column when clicking vertical headers

Vertical headers are only concerned with rows, after all.
This commit is contained in:
Andreas Kling 2020-08-26 14:16:08 +02:00
parent 5b46835a9d
commit e418bdf95b

View file

@ -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