0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 08:34:38 +03:00

Merge branch 'master' into 1.4

This commit is contained in:
Arin Alexander 2016-07-25 14:07:57 +03:00
commit 6fe3e7cbb4
2 changed files with 11 additions and 2 deletions

View File

@ -411,6 +411,13 @@ void BandDesignIntf::setColumnsFillDirection(BandDesignIntf::BandColumnsLayoutTy
}
void BandDesignIntf::moveItemsDown(qreal startPos, qreal offset){
foreach (QGraphicsItem* item, childItems()){
if (item->pos().y()>=startPos)
item->setPos(item->x(),item->y()+offset);
}
}
BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGraphicsItem *parent)
{
int maxBottom = 0;
@ -434,7 +441,8 @@ BaseDesignIntf* BandDesignIntf::cloneUpperPart(int height, QObject *owner, QGrap
upperItem->setHeight(height);
} else {
item->cloneEmpty(sliceHeight,upperPart,upperPart); //for table
qgItem->setPos(item->pos().x(),item->pos().y()+((height+1)-item->geometry().top()));
//qgItem->setPos(item->pos().x(),item->pos().y()+((height+1)-item->geometry().top()));
moveItemsDown(item->pos().y(),(height+1)-item->geometry().top());
}
} else if (item->canBeSplitted(sliceHeight)){
upperItem = item->cloneUpperPart(sliceHeight,upperPart,upperPart);

View File

@ -237,6 +237,7 @@ protected:
void checkEmptyTable();
void setColumnsCount(int value);
void setColumnsFillDirection(BandColumnsLayoutType value);
void moveItemsDown(qreal startPos, qreal offset);
private slots:
void childBandDeleted(QObject* band);
private: