|
@@ -750,7 +750,6 @@ void CaptureWidget::mouseReleaseEvent(QMouseEvent* e)
|
|
|
newGeometry.setBottom(top);
|
|
|
}
|
|
|
m_selection->setGeometry(newGeometry);
|
|
|
- m_context.selection = extendedRect(newGeometry);
|
|
|
updateSizeIndicator();
|
|
|
m_buttonHandler->updatePosition(newGeometry);
|
|
|
m_buttonHandler->show();
|
|
@@ -1046,6 +1045,11 @@ void CaptureWidget::initSelection()
|
|
|
connect(m_selection, &SelectionWidget::animationEnded, this, [this]() {
|
|
|
this->m_buttonHandler->updatePosition(this->m_selection->geometry());
|
|
|
});
|
|
|
+ connect(m_selection, &SelectionWidget::resized, this, [this]() {
|
|
|
+ QRect constrainedToCaptureArea =
|
|
|
+ m_selection->geometry().intersected(rect());
|
|
|
+ m_context.selection = extendedRect(constrainedToCaptureArea);
|
|
|
+ });
|
|
|
m_selection->setVisible(false);
|
|
|
m_selection->setGeometry(QRect());
|
|
|
}
|
|
@@ -1289,8 +1293,6 @@ void CaptureWidget::repositionSelection(QRect r)
|
|
|
{
|
|
|
if (m_selection->isVisible()) {
|
|
|
m_selection->setGeometry(r);
|
|
|
- QRect newGeometry = m_selection->geometry().intersected(rect());
|
|
|
- m_context.selection = extendedRect(newGeometry);
|
|
|
m_buttonHandler->updatePosition(m_selection->geometry());
|
|
|
updateSizeIndicator();
|
|
|
update();
|
|
@@ -1329,7 +1331,6 @@ void CaptureWidget::selectAll()
|
|
|
{
|
|
|
QRect newGeometry = rect();
|
|
|
m_selection->setGeometry(newGeometry);
|
|
|
- m_context.selection = extendedRect(newGeometry);
|
|
|
m_selection->setVisible(true);
|
|
|
m_buttonHandler->updatePosition(m_selection->geometry());
|
|
|
updateSizeIndicator();
|