diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 8788de8..737331d 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -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); diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index ea41965..835aadf 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -236,7 +236,8 @@ protected: void setMarkerColor(QColor color); void checkEmptyTable(); void setColumnsCount(int value); - void setColumnsFillDirection(BandColumnsLayoutType value); + void setColumnsFillDirection(BandColumnsLayoutType value); + void moveItemsDown(qreal startPos, qreal offset); private slots: void childBandDeleted(QObject* band); private: