1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Screen grabber: Fix position of handles with negative selection

When you clicked, and then move towards top-left with the cursor,
and release, the handles were displayed inside the resulting rectangle,
instead of outside.
This commit is contained in:
Stefan Merettig 2015-03-26 16:53:58 +01:00 committed by tux3
parent 076609afb9
commit f032df223f

View File

@ -169,12 +169,20 @@ void ScreenGrabberChooserRectItem::mouseRelease(QGraphicsSceneMouseEvent* event)
}
else
{
QRect normalized = chosenRect();
rectWidth = normalized.width();
rectHeight = normalized.height();
setPos(normalized.x(), normalized.y());
mainRect->setRect(0, 0, rectWidth, rectHeight);
updateHandlePositions();
showHandles();
}
emit regionChosen(chosenRect());
this->state = None;
this->mainRect->ungrabMouse();
state = None;
mainRect->ungrabMouse();
}
}