diff --git a/limereport/lrbasedesignintf.h b/limereport/lrbasedesignintf.h index 0a8bfcd..5492f78 100644 --- a/limereport/lrbasedesignintf.h +++ b/limereport/lrbasedesignintf.h @@ -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: diff --git a/limereport/lrpagedesignintf.cpp b/limereport/lrpagedesignintf.cpp index bb3f2b0..c77b92f 100644 --- a/limereport/lrpagedesignintf.cpp +++ b/limereport/lrpagedesignintf.cpp @@ -1304,10 +1304,15 @@ void PageDesignIntf::bringToFront() } BaseDesignIntf *bdItem = dynamic_cast(item); - if (bdItem) + if (bdItem){ saveChangeProppertyCommand(bdItem->objectName(), "zOrder", bdItem->zValue(), zOrder); - - item->setZValue(zOrder); + BandDesignIntf* band = dynamic_cast(item); + PageItemDesignIntf* page = dynamic_cast(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(item); - - if (bdItem) + if (bdItem){ saveChangeProppertyCommand(bdItem->objectName(), "zOrder", bdItem->zValue(), zOrder); - - item->setZValue(zOrder); + BandDesignIntf* band = dynamic_cast(item); + PageItemDesignIntf* page = dynamic_cast(item); + if (!band && !page) + bdItem->setZValueProperty(zOrder); + } else { + item->setZValue(zOrder); + } } }