X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmdictionary%2Fgui%2FDictManagerModel.cpp;fp=src%2Fmdictionary%2Fgui%2FDictManagerModel.cpp;h=7b8807cd3e0e3625a56bdb28614ecc3770df1553;hb=ebd4c2c97364e18aae17e790155b8f4060981c37;hp=8e53a149bcf2751864e23659a292ad58b816be4a;hpb=08e403fb8f97d1352819f64d81eeda2c65148a40;p=mdictionary diff --git a/src/mdictionary/gui/DictManagerModel.cpp b/src/mdictionary/gui/DictManagerModel.cpp index 8e53a14..7b8807c 100644 --- a/src/mdictionary/gui/DictManagerModel.cpp +++ b/src/mdictionary/gui/DictManagerModel.cpp @@ -151,6 +151,18 @@ void DictManagerModel::setModelProperty(int index, const QVariant value, QString } +void DictManagerModel::setModelProperty(int index, QString role) +{ + if (role.contains("isSelected")) + { + if (index < 0 || index > _dictionaries.count() - 1) + return; + + setDataPriv(index, !_dictionaries[_dictList[index]], IsSelectedRole); + } + +} + void DictManagerModel::itemSelected(int index) { _currentIndex = index;