0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-11-20 06:30:03 +03:00

Finish 1.4.120

This commit is contained in:
Arin Alexander
2019-01-21 14:17:49 +03:00
5 changed files with 12 additions and 11 deletions

View File

@@ -327,7 +327,7 @@ void PageItemDesignIntf::registerBand(BandDesignIntf *band)
band->setParentItem(this);
band->setWidth(pageRect().width()/band->columnsCount());
connect(band, SIGNAL(destroyed(QObject*)),this,SLOT(bandDeleted(QObject*)));
connect(band, SIGNAL(geometryChanged(QObject*,QRectF,QRectF)),this,SLOT(bandGeometryChanged(QObject*,QRectF,QRectF)));
connect(band, SIGNAL(posChanged(QObject*,QPointF,QPointF)),this,SLOT(bandPositionChanged(QObject*,QPointF,QPointF)));
}
}
@@ -798,17 +798,17 @@ void PageItemDesignIntf::moveBandFromTo(int from, int to)
}
void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry)
void PageItemDesignIntf::bandPositionChanged(QObject* object, QPointF newPos, QPointF oldPos)
{
if (itemMode() == DesignMode){
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(object);
int curIndex = band->bandIndex();
BandDesignIntf* bandToSwap = 0;
foreach(BandDesignIntf* curBand, bands()){
if (newGeometry.y() > oldGeometry.y()) {
if (newPos.y() > oldPos.y()) {
if (curBand->bandType() == band->bandType()
&& curIndex < curBand->bandIndex()
&& (curBand->pos().y() + (curBand->height()/2)) < newGeometry.y()
&& (curBand->pos().y() + (curBand->height()/2)) < newPos.y()
&& curBand->parentBand() == band->parentBand())
{
curIndex = curBand->bandIndex();
@@ -817,7 +817,7 @@ void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry
} else {
if (curBand->bandType() == band->bandType()
&& curIndex>curBand->bandIndex()
&& (curBand->pos().y() + (curBand->height()/2)) > newGeometry.y()
&& (curBand->pos().y() + (curBand->height()/2)) > newPos.y()
&& curBand->parentBand() == band->parentBand())
{
curIndex = curBand->bandIndex();