QHeaderView - do not keep indexes from an obsolete model
When we call setModel persistentHiddenSections are no longer relevant. It contains indexes from the previous model. This solves: Task-number: QTBUG-18196 Change-Id: Ida02fa63a915695e3730fd63995ac5f8520ae827 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
e4179d1033
commit
bf909bd637
@ -350,6 +350,7 @@ void QHeaderView::setModel(QAbstractItemModel *model)
|
||||
if (model == this->model())
|
||||
return;
|
||||
Q_D(QHeaderView);
|
||||
d->persistentHiddenSections.clear();
|
||||
if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
|
||||
if (d->orientation == Qt::Horizontal) {
|
||||
QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||
|
Loading…
Reference in New Issue
Block a user