Skip to content

Commit

Permalink
Merge pull request #4912 from Vulpine05/Vulpine05-4888
Browse files Browse the repository at this point in the history
[Manager] Freeze view when modifying columns
  • Loading branch information
AenBleidd authored Sep 6, 2022
2 parents c134d0f + 16df100 commit 3fc6c02
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clientgui/BOINCListCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,12 @@ void CBOINCListCtrl::SetListColumnOrder(wxArrayString& orderArray) {
CBOINCBaseView* pView = (CBOINCBaseView*)GetParent();
wxASSERT(wxDynamicCast(pView, CBOINCBaseView));

// Manager will crash if the scroll bar is not at the left-most position on the
// current view if columns are modified.
//
pView->Freeze();
pView->m_iColumnIndexToColumnID.Clear();
for (i=colCount-1; i>=0; --i) {
DeleteColumn(i);
}

DeleteAllColumns();
stdCount = pView->m_aStdColNameOrder->GetCount();

pView->m_iColumnIDToColumnIndex.Clear();
Expand Down Expand Up @@ -412,6 +413,7 @@ void CBOINCListCtrl::SetListColumnOrder(wxArrayString& orderArray) {
SetColumnsOrder(aOrder);
}
#endif
pView->Thaw();
}


Expand Down

0 comments on commit 3fc6c02

Please sign in to comment.