Fix random error when remove word from bookmark. Fix show all bookmark feature.
[mdictionary] / src / mdictionary / gui / DictManagerModel.cpp
index f2aee34..8e53a14 100644 (file)
@@ -116,7 +116,7 @@ bool DictManagerModel::setData(const QModelIndex &index, const QVariant &value,
 
 int DictManagerModel::setDataPriv(int index, const QVariant &value, int role)
 {
-    if (index < 0 || index > _dictList.count())
+    if (index < 0 || index > _dictList.count() - 1)
         return 0;
 
     CommonDictInterface* dictionary = _dictList[index];