Skip to content

Commit

Permalink
Fix no patterns being set for triggers (#2891)
Browse files Browse the repository at this point in the history
  • Loading branch information
vadi2 committed Jul 31, 2019
1 parent 910bf8f commit 0913755
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/TTrigger.cpp
Expand Up @@ -173,14 +173,16 @@ bool TTrigger::setRegexCodeList(QStringList regexList, QList<int> propertyList,
qDebug() << "[CRITICAL ERROR (plz report):] Trigger name=" << mName << " aborting reason: propertyList.size() != regexList.size()";
}

if (!addingTrigger && ((propertyList.empty()) && (!isFolder()) && (!mColorTrigger))) {
setError(QStringLiteral("<b><font color='blue'>%1</font></b>")
.arg(tr("Error: This trigger has no patterns defined, yet. Add some to activate it.")));
mOK_init = false;
return false;
} else if (addingTrigger) {
mOK_init = true;
return true;
if ((propertyList.empty()) && (!isFolder()) && (!mColorTrigger)) {
if (!addingTrigger) {
setError(QStringLiteral("<b><font color='blue'>%1</font></b>")
.arg(tr("Error: This trigger has no patterns defined, yet. Add some to activate it.")));
mOK_init = false;
return false;
} else {
mOK_init = true;
return true;
}
}

bool state = true;
Expand Down

0 comments on commit 0913755

Please sign in to comment.