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

Finish 1.4.91

This commit is contained in:
Arin Alexander
2018-07-16 16:17:38 +03:00
3 changed files with 8 additions and 7 deletions

View File

@@ -703,7 +703,8 @@ void PageItemDesignIntf::bandDeleted(QObject *band)
}
void PageItemDesignIntf::swapBands(BandDesignIntf* band, BandDesignIntf* bandToSwap){
int startIndex = std::min(band->minChildIndex(), bandToSwap->minChildIndex());
int firstStartIndex = std::min(band->minChildIndex(), bandToSwap->minChildIndex());
int secondStartIndex = std::max(band->minChildIndex(), bandToSwap->minChildIndex());
// int endIndex = std::max(band->maxChildIndex(), bandToSwap->maxChildIndex());
// QList<BandDesignIntf*> bandToMove;
@@ -714,11 +715,11 @@ void PageItemDesignIntf::swapBands(BandDesignIntf* band, BandDesignIntf* bandToS
BandDesignIntf* firstMoveBand = (bandToSwap->bandIndex() > band->bandIndex()) ? bandToSwap: band;
firstMoveBand->changeBandIndex(startIndex, true);
firstMoveBand->changeBandIndex(firstStartIndex, true);
if (firstMoveBand == band){
bandToSwap->changeBandIndex(firstMoveBand->maxChildIndex()+1,true);
bandToSwap->changeBandIndex(secondStartIndex,true);
} else {
band->changeBandIndex(firstMoveBand->maxChildIndex()+1, true);
band->changeBandIndex(secondStartIndex, true);
}
relocateBands();