Fixed Bug: #0347 - 'Search Box Mode' and 'Terminal Style' are not saved/loaded
This commit is contained in:
parent
cb42ce164c
commit
c5f2a3914e
1 changed files with 20 additions and 3 deletions
|
@ -166,7 +166,20 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||||
for (Enum e : settings.getSettings())
|
for (Enum e : settings.getSettings())
|
||||||
{
|
{
|
||||||
String Category = e.getClass().getSimpleName();
|
String Category = e.getClass().getSimpleName();
|
||||||
this.get( Category, e.name(), settings.getSetting( e ).name() );
|
|
||||||
|
Enum value = settings.getSetting( e );
|
||||||
|
Property p = this.get( Category, e.name(), value.name() );
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
value = Enum.valueOf( value.getClass(), p.getString() );
|
||||||
|
}
|
||||||
|
catch (IllegalArgumentException er)
|
||||||
|
{
|
||||||
|
AELog.info( "Invalid value '" + p.getString() + "' for " + e.name() + " using '" + value.name() + "' instead" );
|
||||||
|
}
|
||||||
|
|
||||||
|
settings.putSetting( e, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -208,8 +221,12 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||||
{
|
{
|
||||||
for (Enum e : settings.getSettings())
|
for (Enum e : settings.getSettings())
|
||||||
{
|
{
|
||||||
String Category = e.getClass().getSimpleName();
|
if ( e == setting )
|
||||||
this.get( Category, e.name(), settings.getSetting( e ).name() );
|
{
|
||||||
|
String Category = e.getClass().getSimpleName();
|
||||||
|
Property p = this.get( Category, e.name(), settings.getSetting( e ).name() );
|
||||||
|
p.set( newValue.name() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
save();
|
save();
|
||||||
|
|
Loading…
Reference in a new issue