From fb38307783acce28acd15fe9fbece49ee227cc4f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 8 Feb 2017 09:49:11 +0100 Subject: [PATCH] Preferences: Don't list duplicated spellcheck dictionaries Closes #2195 --- src/lib/preferences/preferences.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 1f3592e14..e3e393257 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -429,6 +429,9 @@ Preferences::Preferences(BrowserWindow* window) const QStringList files = dir.entryList({QSL("*.bdic")}); for (const QString &file : files) { const QString lang = file.left(file.size() - 5); + if (!ui->spellcheckLanguages->findItems(lang, Qt::MatchExactly).isEmpty()) { + continue; + } QListWidgetItem *item = new QListWidgetItem; item->setText(createLanguageItem(lang)); item->setData(Qt::UserRole, lang);