Open Senevri opened 11 years ago
float parsing blows up; some cultures use comma as a decimal separator and XMLReader localizes it's output, it seems.
fix: in both Layer.Load and ObjectGroup.Load:
CultureInfo ci = (CultureInfo)CultureInfo.CurrentCulture.Clone(); ci.NumberFormat.CurrencyDecimalSeparator = ".";
....
result.Opacity = float.Parse(reader.GetAttribute("opacity"), NumberStyles.Any, ci);
Also, cannot handle multiple objects with same name.
Can you send me a pull request for the float parsing issue?
I think I already patched the multiple name issue on my fork, so I can do that patch.
float parsing blows up; some cultures use comma as a decimal separator and XMLReader localizes it's output, it seems.
fix: in both Layer.Load and ObjectGroup.Load:
....