mirror of
https://github.com/fralx/LimeReport.git
synced 2025-01-12 01:21:03 +03:00
Band movement has been fixed
This commit is contained in:
parent
8854f59916
commit
495cf4e35e
@ -105,6 +105,7 @@ void BandMarker::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
|||||||
if (!(event->modifiers() & Qt::ControlModifier))
|
if (!(event->modifiers() & Qt::ControlModifier))
|
||||||
m_band->scene()->clearSelection();
|
m_band->scene()->clearSelection();
|
||||||
m_band->setSelected(true);
|
m_band->setSelected(true);
|
||||||
|
m_oldBandPos = m_band->pos();
|
||||||
update(0,0,boundingRect().width(),boundingRect().width());
|
update(0,0,boundingRect().width(),boundingRect().width());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +137,7 @@ void BandMarker::mouseMoveEvent(QGraphicsSceneMouseEvent* event)
|
|||||||
|
|
||||||
void BandMarker::mouseReleaseEvent(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) :
|
BandDesignIntf::BandDesignIntf(BandsType bandType, const QString &xmlTypeName, QObject* owner, QGraphicsItem *parent) :
|
||||||
|
@ -72,6 +72,7 @@ private:
|
|||||||
QRectF m_rect;
|
QRectF m_rect;
|
||||||
QColor m_color;
|
QColor m_color;
|
||||||
BandDesignIntf* m_band;
|
BandDesignIntf* m_band;
|
||||||
|
QPointF m_oldBandPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BandNameLabel : public QGraphicsItem{
|
class BandNameLabel : public QGraphicsItem{
|
||||||
|
Loading…
Reference in New Issue
Block a user