QHeaderView - minor fix to createSectionSpan
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>bb10
parent
add629d4f1
commit
07ff7fe52c
|
|
@ -3172,8 +3172,10 @@ void QHeaderViewPrivate::resizeSections(QHeaderView::ResizeMode globalMode, bool
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue