diff --git a/NEWS.md b/NEWS.md index 3b93a500..2eef58ee 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,7 @@ Red Panda C++ Version 0.14.3 - enhancement: git - add files - enhancement: git - commit - enhancement: git - restore + - fix: compiler set index not correctly saved, when remove compiler sets in options dialog Red Panda C++ Version 0.14.2 - enhancement: file system view mode for project diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index f4ec5d0b..fc85ea6a 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -2643,7 +2643,6 @@ void Settings::CompilerSets::loadSets() return; } findSets(); - saveSets(); if ( mList.size() <= mDefaultIndex) mDefaultIndex = mList.size()-1; pCurrentSet = defaultSet(); @@ -2653,7 +2652,7 @@ void Settings::CompilerSets::loadSets() saveSets(); return; } - saveSet(mDefaultIndex); + saveSets(); if (pCurrentSet->binDirs().count()>0) { pCurrentSet->setProperties(pCurrentSet->binDirs()[0]); } @@ -2707,12 +2706,10 @@ void Settings::CompilerSets::deleteSet(int index) mSettings->mSettings.endGroup(); } mList.erase(std::begin(mList)+index); - for (size_t i=index;i=mList.size()) { mDefaultIndex = mList.size()-1; } + saveSets(); } Settings::CompilerSetList &Settings::CompilerSets::list()