QHeaderView - Do not try to remove non-existing section
The end parameter passed to removeSectionsFromSpans is off by one. removeSectionsFromSpans can currently handle/ignore it, but it is still wrong. Change-Id: I9148bd106504a37a5c8fd72928ab84c669eebcdb Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This commit is contained in:
parent
5caa75f665
commit
6cab0bed1d
@ -1940,7 +1940,7 @@ void QHeaderView::initializeSections(int start, int end)
|
||||
|
||||
if (end + 1 < d->sectionCount) {
|
||||
int newCount = end + 1;
|
||||
d->removeSectionsFromSpans(newCount, d->sectionCount);
|
||||
d->removeSectionsFromSpans(newCount, d->sectionCount - 1);
|
||||
if (!d->hiddenSectionSize.isEmpty()) {
|
||||
if (d->sectionCount - newCount > d->hiddenSectionSize.count()) {
|
||||
for (int i = end + 1; i < d->sectionCount; ++i)
|
||||
|
Loading…
x
Reference in New Issue
Block a user