Don't add tag when it's empty and we press return

wilder-work
Montel Laurent 9 years ago
parent 4048300030
commit 33405ecc9b
  1. 5
      src/configuredialog/configureappearancepage.cpp

@ -1274,7 +1274,10 @@ void AppearancePage::MessageTagTab::slotAddLineTextChanged(const QString &aText)
void AppearancePage::MessageTagTab::slotAddNewTag()
{
const QString newTagName = mTagAddLineEdit->text();
const QString newTagName = mTagAddLineEdit->text().trimmed();
if (newTagName.isEmpty()) {
return;
}
const int count = mTagListBox->count();
for (int i = 0; i < count; ++i) {
if (mTagListBox->item(i)->text() == newTagName) {

Loading…
Cancel
Save