work save: when save file associations, skip associations that not changed and unchecked

This commit is contained in:
royqh1979@gmail.com 2021-10-04 20:36:20 +08:00
parent b5725e9761
commit 2a3dcf52fa
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ void FileAssociationModel::saveAssociations()
QMap<QString,PFileAssociationItem> fileTypeDescriptions;
foreach (const PFileAssociationItem& item, mItems) {
if (item->selected == item->defaultSelected)
if (item->selected == item->defaultSelected
&& !item->selected)
continue;
bool ok;
fileTypes.insert("DevCpp."+item->suffix);