* Partial fix for issue 380.
* This remove a bug where a variable was not initialized in profiles.
* The impact on this could have ranged all the way to a full trashing
  of the user configuration files (though it requires some bad luck)
This commit is contained in:
jean.chalard
2010-05-05 06:27:52 +00:00
parent b0f1d301b8
commit db96cb5142
2 changed files with 11 additions and 6 deletions

View File

@@ -56,10 +56,9 @@ void OptionInteger::setData(){
//Option Select
void OptionSelect::initSelections(){
//Find currently active bit in the list.
for(size_t i=0;i<selections.size();i++){
if(selections[i] == options[id].str)
value = i;
}
for (size_t i = 0; i < selections.size(); ++i)
if (selections[i] == options[id].str)
value = i;
}
void OptionSelect::Entering(JButton key){
@@ -107,6 +106,11 @@ OptionProfile::OptionProfile(GameApp * _app, JGuiListener * jgl) : OptionDirecto
populate();
};
void OptionProfile::initSelections() {
OptionSelect::initSelections();
initialValue = value;
}
void OptionProfile::addSelection(string s){
OptionDirectory::addSelection(s);