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:
parent
076609afb9
commit
f032df223f
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user