Block actions with label depend on restrictions.
--HG-- branch : feature
This commit is contained in:
parent
0a94c5036b
commit
247dc910d5
|
@ -299,6 +299,10 @@ void VGrainlineItem::mousePressEvent(QGraphicsSceneMouseEvent* pME)
|
|||
m_eMode = mMove;
|
||||
SetOverrideCursor(cursorArrowCloseHand, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetOverrideCursor(cursorArrowCloseHand, 1, 1);
|
||||
}
|
||||
|
||||
setZValue(ACTIVE_Z);
|
||||
Update();
|
||||
|
@ -311,7 +315,7 @@ void VGrainlineItem::mousePressEvent(QGraphicsSceneMouseEvent* pME)
|
|||
setZValue(ACTIVE_Z);
|
||||
Update();
|
||||
}
|
||||
else
|
||||
else // All modifications
|
||||
{
|
||||
if (m_eMode != mRotate)
|
||||
{
|
||||
|
|
|
@ -413,6 +413,24 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
|
|||
m_dRotation = rotation();
|
||||
// in rotation mode, do not do any changes here, because user might want to
|
||||
// rotate the label more.
|
||||
|
||||
if (m_moveType == OnlyRotatable)
|
||||
{
|
||||
if (m_eMode != mRotate)
|
||||
{
|
||||
m_eMode = mRotate;
|
||||
SetOverrideCursor(cursorArrowCloseHand, 1, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetOverrideCursor(cursorArrowCloseHand, 1, 1);
|
||||
}
|
||||
|
||||
setZValue(ACTIVE_Z);
|
||||
Update();
|
||||
}
|
||||
else // All modifications
|
||||
{
|
||||
if (m_eMode != mRotate)
|
||||
{
|
||||
// if user pressed the button inside the resize square, switch to resize mode
|
||||
|
@ -437,6 +455,7 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
|
|||
UpdateBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
|
@ -552,8 +571,11 @@ void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
|
|||
else
|
||||
{ // in rotate mode, if user did just press/release, switch to move mode
|
||||
if (bShort == true)
|
||||
{
|
||||
if (m_moveType != OnlyRotatable)
|
||||
{
|
||||
m_eMode = mMove;
|
||||
}
|
||||
UpdateBox();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user