From a9f065a55903bf22835c081e470a2b9c4c968eab Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 29 Jun 2018 09:22:18 +0200 Subject: [PATCH] Qt/GameList: Fix some resizing bugs --- Source/Core/DolphinQt2/GameList/GameList.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt2/GameList/GameList.cpp b/Source/Core/DolphinQt2/GameList/GameList.cpp index 74ef2447a0..c31b9cb307 100644 --- a/Source/Core/DolphinQt2/GameList/GameList.cpp +++ b/Source/Core/DolphinQt2/GameList/GameList.cpp @@ -574,7 +574,8 @@ void GameList::OnSectionResized(int index, int, int) for (int i = vis_index + 1; i < col_count; i++) { - if (hor_header->sectionResizeMode(i) != QHeaderView::Interactive) + const int logical_index = hor_header->logicalIndex(i); + if (hor_header->sectionResizeMode(logical_index) != QHeaderView::Interactive) continue; last = false; @@ -585,10 +586,11 @@ void GameList::OnSectionResized(int index, int, int) { for (int i = 0; i < vis_index; i++) { - if (hor_header->sectionResizeMode(i) != QHeaderView::Interactive) + const int logical_index = hor_header->logicalIndex(i); + if (hor_header->sectionResizeMode(logical_index) != QHeaderView::Interactive) continue; - hor_header->setSectionResizeMode(hor_header->logicalIndex(i), QHeaderView::Fixed); + hor_header->setSectionResizeMode(logical_index, QHeaderView::Fixed); sections.push_back(i); }