Qt/GameList: Fix some resizing bugs

This commit is contained in:
spycrab 2018-06-29 09:22:18 +02:00
parent 3eef8145d2
commit a9f065a559
1 changed files with 5 additions and 3 deletions

View File

@ -574,7 +574,8 @@ void GameList::OnSectionResized(int index, int, int)
for (int i = vis_index + 1; i < col_count; i++) 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; continue;
last = false; last = false;
@ -585,10 +586,11 @@ void GameList::OnSectionResized(int index, int, int)
{ {
for (int i = 0; i < vis_index; i++) 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; continue;
hor_header->setSectionResizeMode(hor_header->logicalIndex(i), QHeaderView::Fixed); hor_header->setSectionResizeMode(logical_index, QHeaderView::Fixed);
sections.push_back(i); sections.push_back(i);
} }