From 2a3dcf52fa996905b07a8904cbb0715fa5d7044f Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Mon, 4 Oct 2021 20:36:20 +0800 Subject: [PATCH] work save: when save file associations, skip associations that not changed and unchecked --- .../settingsdialog/environmentfileassociationwidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RedPandaIDE/settingsdialog/environmentfileassociationwidget.cpp b/RedPandaIDE/settingsdialog/environmentfileassociationwidget.cpp index 45190dea..a25f6f48 100644 --- a/RedPandaIDE/settingsdialog/environmentfileassociationwidget.cpp +++ b/RedPandaIDE/settingsdialog/environmentfileassociationwidget.cpp @@ -84,7 +84,8 @@ void FileAssociationModel::saveAssociations() QMap 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);