From 495cf4e35e6045dd835b6b20885e214d2fcd4525 Mon Sep 17 00:00:00 2001 From: Arin Alexander Date: Fri, 1 Mar 2019 19:48:49 +0300 Subject: [PATCH] Band movement has been fixed --- limereport/lrbanddesignintf.cpp | 3 ++- limereport/lrbanddesignintf.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/limereport/lrbanddesignintf.cpp b/limereport/lrbanddesignintf.cpp index 9e3323a..37f14d4 100644 --- a/limereport/lrbanddesignintf.cpp +++ b/limereport/lrbanddesignintf.cpp @@ -105,6 +105,7 @@ void BandMarker::mousePressEvent(QGraphicsSceneMouseEvent *event) if (!(event->modifiers() & Qt::ControlModifier)) m_band->scene()->clearSelection(); m_band->setSelected(true); + m_oldBandPos = m_band->pos(); update(0,0,boundingRect().width(),boundingRect().width()); } } @@ -136,7 +137,7 @@ void BandMarker::mouseMoveEvent(QGraphicsSceneMouseEvent* event) void BandMarker::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { - m_band->posChanged(m_band, m_band->pos(), m_band->pos()); + m_band->posChanged(m_band, m_band->pos(), m_oldBandPos); } BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, QObject* owner, QGraphicsItem *parent) : diff --git a/limereport/lrbanddesignintf.h b/limereport/lrbanddesignintf.h index 33bca63..8faf9c8 100644 --- a/limereport/lrbanddesignintf.h +++ b/limereport/lrbanddesignintf.h @@ -72,6 +72,7 @@ private: QRectF m_rect; QColor m_color; BandDesignIntf* m_band; + QPointF m_oldBandPos; }; class BandNameLabel : public QGraphicsItem{