From 603d80e1a5b16727b2179852a65d6119d1ab6096 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 18 Jan 2019 23:44:58 +0300 Subject: [PATCH 1/2] Geometry change event has been reverted --- limereport/lrbasedesignintf.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/limereport/lrbasedesignintf.cpp b/limereport/lrbasedesignintf.cpp index 39de032..610bd5f 100644 --- a/limereport/lrbasedesignintf.cpp +++ b/limereport/lrbasedesignintf.cpp @@ -1126,6 +1126,12 @@ void BaseDesignIntf::setItemPos(const QPointF &newPos) void BaseDesignIntf::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { QGraphicsItem::mouseReleaseEvent(event); + QRectF newGeometry = geometry(); + if (newGeometry != m_oldGeometry) { + geometryChangedEvent(newGeometry, m_oldGeometry); + updateSelectionMarker(); + emit(geometryChanged(this, newGeometry, m_oldGeometry)); + } } void BaseDesignIntf::showEditorDialog(){ From 1135cbd4243dd269a121fedee11ec0a7fd51f234 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 18 Jan 2019 23:45:16 +0300 Subject: [PATCH 2/2] Designtime behavior has been removed from render process --- common.pri | 2 +- limereport/lrpageitemdesignintf.cpp | 52 +++++++++++++++-------------- 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/common.pri b/common.pri index ab95c10..38ad957 100644 --- a/common.pri +++ b/common.pri @@ -77,7 +77,7 @@ RCC_DIR = $${ARCH_DIR}/$${BUILD_TYPE}/rcc LIMEREPORT_VERSION_MAJOR = 1 LIMEREPORT_VERSION_MINOR = 4 -LIMEREPORT_VERSION_RELEASE = 117 +LIMEREPORT_VERSION_RELEASE = 118 LIMEREPORT_VERSION = '\\"$${LIMEREPORT_VERSION_MAJOR}.$${LIMEREPORT_VERSION_MINOR}.$${LIMEREPORT_VERSION_RELEASE}\\"' DEFINES += LIMEREPORT_VERSION_STR=\"$${LIMEREPORT_VERSION}\" diff --git a/limereport/lrpageitemdesignintf.cpp b/limereport/lrpageitemdesignintf.cpp index af65436..c3a20e7 100644 --- a/limereport/lrpageitemdesignintf.cpp +++ b/limereport/lrpageitemdesignintf.cpp @@ -666,33 +666,35 @@ void PageItemDesignIntf::moveBandFromTo(int from, int to) void PageItemDesignIntf::bandGeometryChanged(QObject* object, QRectF newGeometry, QRectF oldGeometry) { - BandDesignIntf* band = dynamic_cast(object); - int curIndex = band->bandIndex(); - BandDesignIntf* bandToSwap = 0; - foreach(BandDesignIntf* curBand, bands()){ - if (newGeometry.y() > oldGeometry.y()) { - if (curBand->bandType() == band->bandType() - && curIndex < curBand->bandIndex() - && (curBand->pos().y() + (curBand->height()/2)) < newGeometry.y() - && curBand->parentBand() == band->parentBand()) - { - curIndex = curBand->bandIndex(); - bandToSwap = curBand; - } - } else { - if (curBand->bandType() == band->bandType() - && curIndex>curBand->bandIndex() - && (curBand->pos().y() + (curBand->height()/2)) > newGeometry.y() - && curBand->parentBand() == band->parentBand()) - { - curIndex = curBand->bandIndex(); - bandToSwap = curBand; + if (itemMode() == DesignMode){ + BandDesignIntf* band = dynamic_cast(object); + int curIndex = band->bandIndex(); + BandDesignIntf* bandToSwap = 0; + foreach(BandDesignIntf* curBand, bands()){ + if (newGeometry.y() > oldGeometry.y()) { + if (curBand->bandType() == band->bandType() + && curIndex < curBand->bandIndex() + && (curBand->pos().y() + (curBand->height()/2)) < newGeometry.y() + && curBand->parentBand() == band->parentBand()) + { + curIndex = curBand->bandIndex(); + bandToSwap = curBand; + } + } else { + if (curBand->bandType() == band->bandType() + && curIndex>curBand->bandIndex() + && (curBand->pos().y() + (curBand->height()/2)) > newGeometry.y() + && curBand->parentBand() == band->parentBand()) + { + curIndex = curBand->bandIndex(); + bandToSwap = curBand; + } } } - } - if (curIndex != band->bandIndex() && itemMode() == DesignMode){ - if (page()) - page()->saveCommand(BandMoveFromToCommand::create(page(), band->bandIndex(), bandToSwap->bandIndex()), true); + if (curIndex != band->bandIndex() && itemMode() == DesignMode){ + if (page()) + page()->saveCommand(BandMoveFromToCommand::create(page(), band->bandIndex(), bandToSwap->bandIndex()), true); + } } relocateBands(); }