mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-24 20:44:39 +03:00
Lost headers moving has been fixed
This commit is contained in:
parent
fed80a8be1
commit
9bd392f4ac
@ -148,7 +148,8 @@ void ReportRender::renameChildItems(BaseDesignIntf *item){
|
|||||||
|
|
||||||
ReportRender::ReportRender(QObject *parent)
|
ReportRender::ReportRender(QObject *parent)
|
||||||
:QObject(parent), m_renderPageItem(0), m_pageCount(0),
|
:QObject(parent), m_renderPageItem(0), m_pageCount(0),
|
||||||
m_lastRenderedHeader(0), m_lastDataBand(0), m_lastRenderedFooter(0), m_currentColumn(0), m_newPageStarted(false)
|
m_lastRenderedHeader(0), m_lastDataBand(0), m_lastRenderedFooter(0),
|
||||||
|
m_currentColumn(0), m_newPageStarted(false), m_lostHeadersMoved(false)
|
||||||
{
|
{
|
||||||
initColumns();
|
initColumns();
|
||||||
}
|
}
|
||||||
@ -490,7 +491,11 @@ BandDesignIntf* ReportRender::renderBand(BandDesignIntf *patternBand, BandDesign
|
|||||||
bandClone->columnsFillDirection()==BandDesignIntf::VerticalUniform))
|
bandClone->columnsFillDirection()==BandDesignIntf::VerticalUniform))
|
||||||
{
|
{
|
||||||
startNewColumn();
|
startNewColumn();
|
||||||
if (patternBand->bandHeader() && patternBand->bandHeader()->columnsCount()>1){
|
if (patternBand->bandHeader() &&
|
||||||
|
patternBand->bandHeader()->columnsCount()>1 &&
|
||||||
|
!m_lostHeadersMoved &&
|
||||||
|
patternBand->bandNestingLevel() == 0
|
||||||
|
){
|
||||||
renderBand(patternBand->bandHeader(), 0, mode);
|
renderBand(patternBand->bandHeader(), 0, mode);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1165,6 +1170,14 @@ BandDesignIntf *ReportRender::saveUppperPartReturnBottom(BandDesignIntf *band, i
|
|||||||
(band->columnsFillDirection()==BandDesignIntf::Vertical ||
|
(band->columnsFillDirection()==BandDesignIntf::Vertical ||
|
||||||
band->columnsFillDirection()==BandDesignIntf::VerticalUniform)){
|
band->columnsFillDirection()==BandDesignIntf::VerticalUniform)){
|
||||||
startNewColumn();
|
startNewColumn();
|
||||||
|
if (patternBand->bandHeader() &&
|
||||||
|
patternBand->bandHeader()->columnsCount()>1 &&
|
||||||
|
!m_lostHeadersMoved &&
|
||||||
|
patternBand->bandNestingLevel() == 0
|
||||||
|
){
|
||||||
|
renderBand(patternBand->bandHeader(), 0, StartNewPageAsNeeded);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
savePage();
|
savePage();
|
||||||
startNewPage();
|
startNewPage();
|
||||||
@ -1332,12 +1345,16 @@ void ReportRender::checkLostHeadersOnPrevPage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lostHeaders.size() > 0){
|
if (lostHeaders.size() > 0){
|
||||||
|
m_lostHeadersMoved = true;
|
||||||
qSort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
|
qSort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
|
||||||
foreach(BandDesignIntf* header, lostHeaders){
|
foreach(BandDesignIntf* header, lostHeaders){
|
||||||
registerBand(header);
|
registerBand(header);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
m_lostHeadersMoved = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReportRender::checkLostHeadersInPrevColumn()
|
void ReportRender::checkLostHeadersInPrevColumn()
|
||||||
@ -1365,10 +1382,13 @@ void ReportRender::checkLostHeadersInPrevColumn()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lostHeaders.size() > 0){
|
if (lostHeaders.size() > 0){
|
||||||
|
m_lostHeadersMoved = true;
|
||||||
qSort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
|
qSort(lostHeaders.begin(), lostHeaders.end(), bandLessThen);
|
||||||
foreach(BandDesignIntf* header, lostHeaders){
|
foreach(BandDesignIntf* header, lostHeaders){
|
||||||
registerBand(header);
|
registerBand(header);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
m_lostHeadersMoved = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,6 +215,7 @@ private:
|
|||||||
QVector<BandDesignIntf*> m_columnedBandItems;
|
QVector<BandDesignIntf*> m_columnedBandItems;
|
||||||
unsigned long long m_currentNameIndex;
|
unsigned long long m_currentNameIndex;
|
||||||
bool m_newPageStarted;
|
bool m_newPageStarted;
|
||||||
|
bool m_lostHeadersMoved;
|
||||||
|
|
||||||
};
|
};
|
||||||
} // namespace LimeReport
|
} // namespace LimeReport
|
||||||
|
Loading…
Reference in New Issue
Block a user