Don't allow manipulating area selection when highlighting match

This commit is contained in:
WarmUpTill
2022-04-02 21:20:40 +02:00
committed by WarmUpTill
parent 6685a1ccaa
commit 07f11c63f0

View File

@@ -51,11 +51,17 @@ void PreviewDialog::mousePressEvent(QMouseEvent *event)
void PreviewDialog::mouseMoveEvent(QMouseEvent *event)
{
if (_type == Type::SHOW_MATCH) {
return;
}
_rubberBand->setGeometry(QRect(_origin, event->pos()).normalized());
}
void PreviewDialog::mouseReleaseEvent(QMouseEvent *)
{
if (_type == Type::SHOW_MATCH) {
return;
}
auto selectionStart =
_rubberBand->mapToGlobal(_rubberBand->rect().topLeft());
QRect selectionArea(selectionStart, _rubberBand->size());