SANKORE-570

Triangle: Resizing of the tool is broken
preferencesAboutTextFull
Anatoly Mihalchenko 12 years ago
parent 9bf14340d3
commit 5f9f9ea6b5
  1. 5
      src/tools/UBGraphicsTriangle.cpp

@ -596,7 +596,7 @@ QCursor UBGraphicsTriangle::flipCursor() const
void UBGraphicsTriangle::mousePressEvent(QGraphicsSceneMouseEvent *event) void UBGraphicsTriangle::mousePressEvent(QGraphicsSceneMouseEvent *event)
{ {
lastRect = rect().toRect(); lastRect = rect().toRect();
lastPos = transform().inverted().map(event->screenPos()); lastPos = sceneTransform().inverted().map(event->screenPos());
if (resize1Polygon().containsPoint(event->pos().toPoint(), Qt::OddEvenFill)) if (resize1Polygon().containsPoint(event->pos().toPoint(), Qt::OddEvenFill))
{ {
@ -636,7 +636,7 @@ void UBGraphicsTriangle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
} }
else else
{ {
QPoint currPos = transform().inverted().map(event->screenPos()); QPoint currPos = sceneTransform().inverted().map(event->screenPos());
if (mResizing1) if (mResizing1)
{ {
@ -804,6 +804,7 @@ void UBGraphicsTriangle::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void UBGraphicsTriangle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void UBGraphicsTriangle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
mResizing1 = mResizing2 = mRotating = false;
mShowButtons = false; mShowButtons = false;
setCursor(Qt::ArrowCursor); setCursor(Qt::ArrowCursor);
mCloseSvgItem->setVisible(false); mCloseSvgItem->setVisible(false);

Loading…
Cancel
Save