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:
parent
6a312e7459
commit
783cdf938a
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user