mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 04:11:06 -05:00
Fix process condition not respecting regex options
This commit is contained in:
@@ -33,8 +33,16 @@ bool MacroConditionProcess::CheckCondition()
|
||||
return false;
|
||||
}
|
||||
|
||||
auto matchIndex = runningProcesses.indexOf(QRegularExpression(proc));
|
||||
if (matchIndex == -1) {
|
||||
int matchIndex = -1;
|
||||
bool foundMatch = false;
|
||||
for (const auto &process : runningProcesses) {
|
||||
matchIndex++;
|
||||
if (_regex.Matches(process, proc)) {
|
||||
foundMatch = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!foundMatch) {
|
||||
return false;
|
||||
}
|
||||
if (!_checkFocus) {
|
||||
|
||||
Reference in New Issue
Block a user