Don't change position when restricted by center pin point.
--HG-- branch : feature
This commit is contained in:
parent
6802c6f154
commit
698eaa7736
|
@ -516,15 +516,15 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
|
||||||
// in resize mode, resize the label along the mouse move from the origin
|
// in resize mode, resize the label along the mouse move from the origin
|
||||||
QPointF pt;
|
QPointF pt;
|
||||||
|
|
||||||
// if (m_moveType & IsMovable)
|
if (m_moveType & IsMovable)
|
||||||
// {
|
{
|
||||||
pt = m_ptStartPos;
|
pt = m_ptStartPos;
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// pt = m_ptRotCenter - QRectF(0, 0, m_szStart.width() + ptDiff.x(),
|
pt = m_ptRotCenter - QRectF(0, 0, m_szStart.width() + ptDiff.x(),
|
||||||
// m_szStart.height() + ptDiff.y()).center();
|
m_szStart.height() + ptDiff.y()).center();
|
||||||
// }
|
}
|
||||||
|
|
||||||
rectBB.setTopLeft(pt);
|
rectBB.setTopLeft(pt);
|
||||||
QSizeF sz(m_szStart.width() + ptDiff.x(), m_szStart.height() + ptDiff.y());
|
QSizeF sz(m_szStart.width() + ptDiff.x(), m_szStart.height() + ptDiff.y());
|
||||||
|
@ -534,13 +534,13 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
|
||||||
{
|
{
|
||||||
sz = QSizeF(sz.width()+dX, sz.height()+dY);
|
sz = QSizeF(sz.width()+dX, sz.height()+dY);
|
||||||
}
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// if (not (m_moveType & IsMovable))
|
if (not (m_moveType & IsMovable))
|
||||||
// {
|
{
|
||||||
// setPos(pt);
|
setPos(pt);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
SetSize(sz.width(), sz.height());
|
SetSize(sz.width(), sz.height());
|
||||||
Update();
|
Update();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user