J :
* 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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user