Do not reset column_widths_ on model change (#6058)

`column_widths_` is managed elsewhere. Resetting it on model change
makes tab-switching slow, and---if a vertical scroll bar becomes visible
or hidden---can be triggered in unexpected situations, leading to
visible column information loss.

Signed-off-by: Antonio Russo <antonio.e.russo@gmail.com>
This commit is contained in:
Antonio Russo 2018-05-23 07:53:12 -04:00 committed by John Maguire
parent 6a312e7459
commit 783cdf938a
1 changed files with 0 additions and 5 deletions

View File

@ -39,11 +39,6 @@ StretchHeaderView::StretchHeaderView(Qt::Orientation orientation,
void StretchHeaderView::setModel(QAbstractItemModel* model) {
QHeaderView::setModel(model);
if (stretch_enabled_) {
column_widths_.resize(count());
std::fill(column_widths_.begin(), column_widths_.end(), 1.0 / count());
}
}
void StretchHeaderView::NormaliseWidths(const QList<int>& sections) {