Browse Source

Fix bug that caused highlighting colors to change even when the option dialog was cancelled.

4.0
Daniel Grunwald 15 years ago
parent
commit
0f9e6d0d69
  1. 4
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs

4
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CustomizedHighlightingColor.cs

@ -31,7 +31,9 @@ namespace ICSharpCode.AvalonEdit.AddIn @@ -31,7 +31,9 @@ namespace ICSharpCode.AvalonEdit.AddIn
public static List<CustomizedHighlightingColor> LoadColors()
{
return PropertyService.Get("CustomizedHighlightingRules", new List<CustomizedHighlightingColor>());
var list = PropertyService.Get("CustomizedHighlightingRules", new List<CustomizedHighlightingColor>());
// Always make a copy of the list so that the original list cannot be modified without using SaveColors().
return new List<CustomizedHighlightingColor>(list);
}
/// <summary>

Loading…
Cancel
Save