0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-25 00:54:39 +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;} virtual bool canContainChildren(){ return false;}
ReportSettings* reportSettings() const; ReportSettings* reportSettings() const;
void setReportSettings(ReportSettings *reportSettings); void setReportSettings(ReportSettings *reportSettings);
void setZValueProperty(qreal value);
Q_INVOKABLE QString setItemWidth(qreal width); Q_INVOKABLE QString setItemWidth(qreal width);
Q_INVOKABLE QString setItemHeight(qreal height); Q_INVOKABLE QString setItemHeight(qreal height);
@ -309,7 +310,6 @@ private:
int resizeDirectionFlags(QPointF position); int resizeDirectionFlags(QPointF position);
void moveSelectedItems(QPointF delta); void moveSelectedItems(QPointF delta);
Qt::CursorShape getPosibleCursor(int cursorFlags); Qt::CursorShape getPosibleCursor(int cursorFlags);
void setZValueProperty(qreal value);
void updatePosibleDirectionFlags(); void updatePosibleDirectionFlags();
void turnOnSelectionMarker(bool value); void turnOnSelectionMarker(bool value);
private: private:

View File

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