- fix: compiler set index not correctly saved, when remove compiler sets in options dialog
This commit is contained in:
parent
c58b76d7cd
commit
a2289463f9
1
NEWS.md
1
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
|
||||
|
|
|
@ -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();i++) {
|
||||
saveSet(i);
|
||||
}
|
||||
if (mDefaultIndex>=mList.size()) {
|
||||
mDefaultIndex = mList.size()-1;
|
||||
}
|
||||
saveSets();
|
||||
}
|
||||
|
||||
Settings::CompilerSetList &Settings::CompilerSets::list()
|
||||
|
|
Loading…
Reference in New Issue