Фууух, ну и задачка попалась. Устал дебажить
Вообщем вот тут происходит ошибка:
void PageItemDesignIntf::relocateBands()
{
if (isLoading()) return;
int bandSpace = (itemMode() & DesignMode)?4:0;
QVector<qreal> posByColumn;
qSort(m_bands.begin(),m_bands.end(),bandSortBandLessThenByIndex);
int bandIndex = 0;
if (!(itemMode() & DesignMode)){
while ( (bandIndex < m_bands.count()) &&
((m_bands[bandIndex]->bandType() == BandDesignIntf::TearOffBand) ||
(m_bands[bandIndex]->bandType() == BandDesignIntf::PageFooter) ||
m_bands[bandIndex]->bandType() == BandDesignIntf::ReportFooter )
){
bandIndex++;
}
}
if ( (m_bands.count()>0) && (bandIndex<m_bands.count()) ) {
initColumnsPos(posByColumn,pageRect().y(),m_bands[bandIndex]->columnsCount());
m_bands[bandIndex]->setPos(pageRect().x(),pageRect().y());
posByColumn[0]+=m_bands[bandIndex]->height()+bandSpace;
}
if(m_bands.count()>1){
for(int i=0;i<(m_bands.count()-1);i++){
if (((m_bands[i+1]->bandType()!=BandDesignIntf::PageFooter) &&
(m_bands[i+1]->bandType()!=BandDesignIntf::TearOffBand)) || (itemMode() & DesignMode)){
if (m_bands[i+1]->columnsCount()>1 &&
m_bands
->columnsCount() != m_bands[i+1]->columnsCount())
{
qreal curPos = posByColumn[0];
initColumnsPos(posByColumn,
curPos,
m_bands[i+1]->columnsCount());
}
if (m_bands[i+1]->columnIndex()==0){
m_bands[i+1]->setPos(pageRect().x(),posByColumn[0]);
posByColumn[0] += m_bands[i+1]->height()+bandSpace;
} else {
//columnIndex()==-1
m_bands[i+1]->setPos(m_bands[i+1]->pos().x(),posByColumn[m_bands[i+1]->columnIndex()]);
posByColumn[m_bands[i+1]->columnIndex()] += m_bands[i+1]->height()+bandSpace;
}
}
}
foreach(BandDesignIntf* band, m_bands){
if (band->isSelected()) band->updateBandNameLabel();
}
}
}