0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 00:33:02 +03:00

zOrder fixed for Page and Band

This commit is contained in:
Arin Alex 2016-08-02 00:35:57 +03:00
parent 8e632855b4
commit 6a1b244104
2 changed files with 17 additions and 8 deletions

View File

@ -248,6 +248,7 @@ public:
virtual bool canContainChildren(){ return false;}
ReportSettings* reportSettings() const;
void setReportSettings(ReportSettings *reportSettings);
void setZValueProperty(qreal value);
Q_INVOKABLE QString setItemWidth(qreal width);
Q_INVOKABLE QString setItemHeight(qreal height);
@ -309,7 +310,6 @@ private:
int resizeDirectionFlags(QPointF position);
void moveSelectedItems(QPointF delta);
Qt::CursorShape getPosibleCursor(int cursorFlags);
void setZValueProperty(qreal value);
void updatePosibleDirectionFlags();
void turnOnSelectionMarker(bool value);
private:

View File

@ -1304,10 +1304,15 @@ void PageDesignIntf::bringToFront()
}
BaseDesignIntf *bdItem = dynamic_cast<BaseDesignIntf *>(item);
if (bdItem)
if (bdItem){
saveChangeProppertyCommand(bdItem->objectName(), "zOrder", bdItem->zValue(), zOrder);
item->setZValue(zOrder);
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(item);
PageItemDesignIntf* page = dynamic_cast<PageItemDesignIntf*>(item);
if (!band && !page)
bdItem->setZValueProperty(zOrder);
} else {
item->setZValue(zOrder);
}
}
}
@ -1320,11 +1325,15 @@ void PageDesignIntf::sendToBack()
zOrder = colItem->zValue() - 0.1;
}
BaseDesignIntf *bdItem = dynamic_cast<BaseDesignIntf *>(item);
if (bdItem)
if (bdItem){
saveChangeProppertyCommand(bdItem->objectName(), "zOrder", bdItem->zValue(), zOrder);
item->setZValue(zOrder);
BandDesignIntf* band = dynamic_cast<BandDesignIntf*>(item);
PageItemDesignIntf* page = dynamic_cast<PageItemDesignIntf*>(item);
if (!band && !page)
bdItem->setZValueProperty(zOrder);
} else {
item->setZValue(zOrder);
}
}
}