Commit eab42b8b authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 5b1604bf
......@@ -74,9 +74,11 @@ void SelectMatchTypeComboBox::setCode(const QString &code, const QString &name,
const int index = findData(code);
if (index != -1) {
setCurrentIndex(index);
//TODO optimize
const QString value = itemData(index).toString();
Q_EMIT switchToRegexp(value.contains(QStringLiteral("regex")));
if (mHasRegexCapability) {
//TODO optimize
const QString value = itemData(index).toString();
Q_EMIT switchToRegexp(value.contains(QStringLiteral("regex")));
}
} else {
AutoCreateScriptUtil::comboboxItemNotFound(code, name, error);
setCurrentIndex(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment