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.
This commit is contained in:
aldelaro5 2018-05-11 07:23:37 -04:00
parent daf8df951c
commit be6b4edb0c
No known key found for this signature in database
GPG Key ID: 054DD3E6FF48DB71
1 changed files with 2 additions and 2 deletions

View File

@ -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();