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

Band moving in design mode has been fixed

This commit is contained in:
Arin Alexander
2020-04-23 21:03:22 +03:00
parent 985c849f41
commit ca6241f61e
6 changed files with 38 additions and 14 deletions

View File

@@ -876,8 +876,8 @@ void PageItemDesignIntf::moveBandFromTo(int from, int to)
void PageItemDesignIntf::bandPositionChanged(QObject* object, QPointF newPos, QPointF oldPos)
{
if (itemMode() == DesignMode){
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(object);
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(object);
if (band && !band->isChangingPos() && (itemMode() == DesignMode)){
int curIndex = band->bandIndex();
BandDesignIntf* bandToSwap = 0;
foreach(BandDesignIntf* curBand, bands()){
@@ -906,7 +906,8 @@ void PageItemDesignIntf::bandPositionChanged(QObject* object, QPointF newPos, QP
page()->saveCommand(BandMoveFromToCommand::create(page(), band->bandIndex(), bandToSwap->bandIndex()), true);
}
}
relocateBands();
if (band && !band->isChangingPos())
relocateBands();
}
void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry)