Fix enum preferences
This commit is contained in:
parent
f656f5b67c
commit
17cb2a3d97
1 changed files with 7 additions and 0 deletions
|
@ -479,6 +479,13 @@ public class OsmandSettings {
|
|||
return false;
|
||||
} else if (value instanceof Enum) {
|
||||
return enumPref.setModeValue(mode, value);
|
||||
} else if (value instanceof Integer) {
|
||||
int newVal = (Integer) value;
|
||||
if (enumPref.values.length > newVal) {
|
||||
Enum enumValue = enumPref.values[newVal];
|
||||
return enumPref.setModeValue(mode, enumValue);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} else if (preference instanceof ContextMenuItemsPreference) {
|
||||
if (value instanceof ContextMenuItemsSettings) {
|
||||
|
|
Loading…
Reference in a new issue