Fixed property losing state after rename. (#4123)

This commit is contained in:
joeflatt authored and LexManos committed 2017-10-31 11:30:39 -07:00
1 parent 274dfc23ef
commit 7d333eb100
2 files changed
+84 -3

No files matched your search

@@ -1412,10 +1412,12 @@ public class Configuration
{
if (hasCategory(category))
{
if (getCategory(category).containsKey(oldPropName) && !oldPropName.equalsIgnoreCase(newPropName))
ConfigCategory cat = getCategory(category);
if (cat.containsKey(oldPropName) && !oldPropName.equalsIgnoreCase(newPropName))
{
get(category, newPropName, getCategory(category).get(oldPropName).getString(), "");
getCategory(category).remove(oldPropName);
Property prop = cat.remove(oldPropName);
prop.setName(newPropName);
cat.put(newPropName, prop);
return true;
}
}