Commit ec6ccc8b authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix enabled/disable ok button

parent fe1445f9
Pipeline #110254 passed with stage
in 13 minutes and 31 seconds
......@@ -55,6 +55,12 @@ void ConfirmBeforeDeletingCreateRuleWidget::slotRuleTypeChanged(int index)
const QString str = mRuleTypeComboBox->itemData(index).toString();
const bool isAStatus = (str == QStringLiteral("unread") || str == QStringLiteral("important"));
mPatternLineEdit->setEnabled(!isAStatus);
if (isAStatus) {
mPatternLineEdit->clear();
Q_EMIT updateOkButton(true);
} else {
Q_EMIT updateOkButton(!mPatternLineEdit->text().trimmed().isEmpty());
}
}
void ConfirmBeforeDeletingCreateRuleWidget::setInfo(const ConfirmBeforeDeletingCreateRuleWidget::ConfirmBeforeDeletingInfo &info)
......
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