Permalink
Browse files

Qt/debugger: only resize the columns of the code view once per update

Putting the columns to resizeToContents causes way too much resizes per updates which can cause severe lags and even crashes.  This only does one resize at the end of the columns.
  • Loading branch information...
aldelaro5 committed May 11, 2018
1 parent daf8df9 commit be6b4edb0c83551e12305603bc90e5bee33a134a
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/Core/DolphinQt2/Debugger/CodeViewWidget.cpp
@@ -44,8 +44,7 @@ CodeViewWidget::CodeViewWidget()
for (int i = 0; i < columnCount(); i++)
{
horizontalHeader()->setSectionResizeMode(i, i == 0 ? QHeaderView::Fixed :
QHeaderView::ResizeToContents);
horizontalHeader()->setSectionResizeMode(i, QHeaderView::Fixed);
}
verticalHeader()->hide();
@@ -174,6 +173,7 @@ void CodeViewWidget::Update()
}
}
resizeColumnsToContents();
setColumnWidth(0, 24 + 5);
g_symbolDB.FillInCallers();

0 comments on commit be6b4ed

Please sign in to comment.