Skip to content

Commit 07f11c6

Browse files
committed
Don't allow manipulating area selection when highlighting match
1 parent 6685a1c commit 07f11c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/external-macro-modules/opencv/preview-dialog.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@ void PreviewDialog::mousePressEvent(QMouseEvent *event)
5151

5252
void PreviewDialog::mouseMoveEvent(QMouseEvent *event)
5353
{
54+
if (_type == Type::SHOW_MATCH) {
55+
return;
56+
}
5457
_rubberBand->setGeometry(QRect(_origin, event->pos()).normalized());
5558
}
5659

5760
void PreviewDialog::mouseReleaseEvent(QMouseEvent *)
5861
{
62+
if (_type == Type::SHOW_MATCH) {
63+
return;
64+
}
5965
auto selectionStart =
6066
_rubberBand->mapToGlobal(_rubberBand->rect().topLeft());
6167
QRect selectionArea(selectionStart, _rubberBand->size());

0 commit comments

Comments
 (0)