Prevent capture stuck

This commit is contained in:
Gres 2020-03-21 15:29:07 +03:00
parent 668c8f1183
commit 178c954124

View File

@ -123,8 +123,10 @@ void CaptureAreaSelector::mouseMoveEvent(QMouseEvent *event)
void CaptureAreaSelector::mouseReleaseEvent(QMouseEvent *event)
{
if (startSelectPos_.isNull() || pixmap_.isNull())
if (startSelectPos_.isNull() || pixmap_.isNull()) {
capturer_.canceled();
return;
}
const auto endPos = event->pos();
const auto selection = QRect(startSelectPos_, endPos).normalized();