Commit 5f9f9ea6 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

SANKORE-570

Triangle: Resizing of the tool is broken
parent 9bf14340
......@@ -596,7 +596,7 @@ QCursor UBGraphicsTriangle::flipCursor() const
void UBGraphicsTriangle::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
lastRect = rect().toRect();
lastPos = transform().inverted().map(event->screenPos());
lastPos = sceneTransform().inverted().map(event->screenPos());
if (resize1Polygon().containsPoint(event->pos().toPoint(), Qt::OddEvenFill))
{
......@@ -636,7 +636,7 @@ void UBGraphicsTriangle::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
else
{
QPoint currPos = transform().inverted().map(event->screenPos());
QPoint currPos = sceneTransform().inverted().map(event->screenPos());
if (mResizing1)
{
......@@ -804,6 +804,7 @@ void UBGraphicsTriangle::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void UBGraphicsTriangle::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
mResizing1 = mResizing2 = mRotating = false;
mShowButtons = false;
setCursor(Qt::ArrowCursor);
mCloseSvgItem->setVisible(false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment