mirror of
https://github.com/fralx/LimeReport.git
synced 2024-12-24 16:44:39 +03:00
Finish 1.4.89
This commit is contained in:
commit
329ac09db2
@ -105,7 +105,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc
|
|||||||
|
|
||||||
LIMEREPORT_VERSION_MAJOR = 1
|
LIMEREPORT_VERSION_MAJOR = 1
|
||||||
LIMEREPORT_VERSION_MINOR = 4
|
LIMEREPORT_VERSION_MINOR = 4
|
||||||
LIMEREPORT_VERSION_RELEASE = 88
|
LIMEREPORT_VERSION_RELEASE = 89
|
||||||
|
|
||||||
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
LIMEREPORT_VERSION = '$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}'
|
||||||
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
DEFINES *= LIMEREPORT_VERSION_STR=\\\"$${LIMEREPORT_VERSION}\\\"
|
||||||
|
@ -398,6 +398,19 @@ int BandDesignIntf::minChildIndex(BandDesignIntf::BandsType bandType){
|
|||||||
return curIndex;
|
return curIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int BandDesignIntf::minChildIndex(QSet<BandDesignIntf::BandsType> ignoredBands)
|
||||||
|
{
|
||||||
|
int curIndex = bandIndex();
|
||||||
|
foreach(BandDesignIntf* childBand, childBands()){
|
||||||
|
if (!ignoredBands.contains(childBand->bandType()) && childBand->bandIndex() < bandIndex()){
|
||||||
|
curIndex = std::min(curIndex, childBand->maxChildIndex(ignoredBands));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return curIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QList<BandDesignIntf *> BandDesignIntf::childrenByType(BandDesignIntf::BandsType type)
|
QList<BandDesignIntf *> BandDesignIntf::childrenByType(BandDesignIntf::BandsType type)
|
||||||
{
|
{
|
||||||
QList<BandDesignIntf*> resList;
|
QList<BandDesignIntf*> resList;
|
||||||
|
@ -173,6 +173,7 @@ public:
|
|||||||
bool isConnectedToBand(BandDesignIntf::BandsType bandType) const;
|
bool isConnectedToBand(BandDesignIntf::BandsType bandType) const;
|
||||||
|
|
||||||
int minChildIndex(BandsType bandType);
|
int minChildIndex(BandsType bandType);
|
||||||
|
int minChildIndex(QSet<BandsType> ignoredBands = QSet<BandDesignIntf::BandsType>());
|
||||||
int maxChildIndex(BandDesignIntf::BandsType bandType) const;
|
int maxChildIndex(BandDesignIntf::BandsType bandType) const;
|
||||||
int maxChildIndex(QSet<BandsType> ignoredBands = QSet<BandDesignIntf::BandsType>()) const;
|
int maxChildIndex(QSet<BandsType> ignoredBands = QSet<BandDesignIntf::BandsType>()) const;
|
||||||
|
|
||||||
|
@ -1001,7 +1001,9 @@ void BaseDesignIntf::setGeometryProperty(QRectF rect)
|
|||||||
setWidth(rect.width());
|
setWidth(rect.width());
|
||||||
if (rect.height() != geometry().height())
|
if (rect.height() != geometry().height())
|
||||||
setHeight(rect.height());
|
setHeight(rect.height());
|
||||||
if (!isLoading()) notify("geometry",oldValue,rect);
|
if (!isLoading()) {
|
||||||
|
notify("geometry",oldValue,rect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,9 +729,32 @@ void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (curIndex != band->bandIndex()){
|
if (curIndex != band->bandIndex()){
|
||||||
int swapIndex = bandToSwap->maxChildIndex();
|
|
||||||
bandToSwap->changeBandIndex(band->bandIndex(),true);
|
int startIndex = std::min(band->minChildIndex(), bandToSwap->minChildIndex());
|
||||||
band->changeBandIndex(swapIndex,true);
|
|
||||||
|
// int endIndex = std::max(band->maxChildIndex(), bandToSwap->maxChildIndex());
|
||||||
|
// QList<BandDesignIntf*> bandToMove;
|
||||||
|
// foreach(BandDesignIntf* curBand, m_bands){
|
||||||
|
// if (curBand->bandIndex() > endIndex)
|
||||||
|
// bandToMove.append(curBand);
|
||||||
|
// }
|
||||||
|
|
||||||
|
BandDesignIntf* firstMoveBand = (bandToSwap->bandIndex() > band->bandIndex()) ? bandToSwap: band;
|
||||||
|
|
||||||
|
firstMoveBand->changeBandIndex(startIndex, true);
|
||||||
|
if (firstMoveBand == band){
|
||||||
|
bandToSwap->changeBandIndex(firstMoveBand->maxChildIndex()+1,true);
|
||||||
|
} else {
|
||||||
|
band->changeBandIndex(firstMoveBand->maxChildIndex()+1, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// int maxNewIndex = std::max(band->maxChildIndex(), bandToSwap->maxChildIndex());
|
||||||
|
// if (maxNewIndex > endIndex){
|
||||||
|
// foreach(BandDesignIntf* curBand, bandToMove){
|
||||||
|
// curBand->setBandIndex(curBand->bandIndex()+(maxNewIndex - endIndex));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
relocateBands();
|
relocateBands();
|
||||||
|
Loading…
Reference in New Issue
Block a user