fixed compass issue

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent 92b608a287
commit ab09c2b5f5
  1. 7
      src/tools/UBGraphicsCompass.cpp

@ -203,18 +203,23 @@ void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event)
mResizing = true;
mRotating = false;
event->accept();
qDebug() << "resizing";
}
else if (hingeRect().contains(event->pos()))
{
mRotating = true;
mResizing = false;
event->accept();
qDebug() << "hinge";
}
else if (!closeButtonRect().contains(event->pos()))
{
qDebug() << "the rest";
mDrawing = event->pos().x() > rect().right() - sPencilLength - sPencilBaseLength;
if (mDrawing)
{
qDebug() << "drawing";
mSpanAngleInDegrees = 0;
mSceneArcStartPoint = mapToScene(pencilPosition());
scene()->initStroke();
@ -305,6 +310,8 @@ void UBGraphicsCompass::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
QGraphicsRectItem::mouseReleaseEvent(event);
}
mRotating = false;
mResizing = false;
mDrawing = false;

Loading…
Cancel
Save