I am unsure if this is only theoretic - but if/when we have added
sections here - we must ensure that we recalculate startpositions.
Change-Id: I70bf55209f1a1a885cb49748b65218879bc68776
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
void QHeaderViewPrivate::createSectionSpan(int start, int end, int size, QHeaderView::ResizeMode mode)
{
int sizePerSection = size / (end - start + 1);
- if (end >= sectionSpans.count())
+ if (end >= sectionSpans.count()) {
sectionSpans.resize(end + 1);
+ sectionStartposRecalc = true;
+ }
SectionSpan *sectiondata = sectionSpans.data();
for (int i = start; i <= end; ++i) {
length += (sizePerSection - sectiondata[i].size);