Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit 931dea8

Browse files
committed
Fix: Not correctly updating cache of project-specific formatter settings after loading project.
1 parent 3111578 commit 931dea8

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/CSharpFormattingOptionsContainer.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ public void Reset(CSharpFormattingOptions options = null)
8585
/// <returns>Clone of options container.</returns>
8686
public CSharpFormattingOptionsContainer Clone()
8787
{
88-
// var cloneActiveOptions = new HashSet<string>();
89-
// foreach (var activeOption in activeOptions)
90-
// cloneActiveOptions.Add(activeOption);
91-
// var clone = new CSharpFormattingOptionsContainer(parent, cloneActiveOptions);
92-
// clone.Reset(cachedOptions.Clone());
93-
// return clone;
94-
9588
var clone = new CSharpFormattingOptionsContainer(parent);
9689
clone.CloneFrom(this);
9790
return clone;
@@ -134,7 +127,7 @@ private void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
134127
// We rely on property value from some of the parents and have to update it from there
135128
PropertyInfo propertyInfo = typeof(CSharpFormattingOptions).GetProperty(e.PropertyName);
136129
if (propertyInfo != null) {
137-
var val = GetOption(e.PropertyName);
130+
var val = GetEffectiveOption(e.PropertyName);
138131
propertyInfo.SetValue(cachedOptions, val);
139132
OnPropertyChanged(e.PropertyName);
140133
}

0 commit comments

Comments
 (0)