Display different message if whole image matches pattern

The "pattern is highlighted in red" message does not make sense in this
case as there is no room to display the red border around the match.
This commit is contained in:
WarmUpTill
2023-06-03 13:24:47 +02:00
committed by WarmUpTill
parent 284c8020b2
commit 76c759c8f4
2 changed files with 4 additions and 0 deletions

View File

@@ -307,6 +307,9 @@ void PreviewImage::MarkMatch(QImage &screenshot,
if (result.total() == 0 || countNonZero(result) == 0) {
emit StatusUpdate(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchFail"));
} else if (result.cols == 1 && result.rows == 1) {
emit StatusUpdate(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchSuccessFullImage"));
} else {
emit StatusUpdate(obs_module_text(
"AdvSceneSwitcher.condition.video.patternMatchSuccess"));