[mono/monodevelop] d27fa365: Fixed 'Bug 15962 - [regression] Solution-wide code-formatting settings
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <0000014245befeab-6ea2c532-c154-445a-876a-e2e6ca98cc79-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/monodevelop
Compare: https://github.com/mono/monodevelop/compare/400bdc75f7e9...d27fa365b681
Commit: d27fa365b681ca30e8f2184359cbd8c34ee90eb0
Author: Mike Krüger <[email protected]> (mkrueger)
Date: 2013-11-11 05:59:03 GMT
URL: https://github.com/mono/monodevelop/commit/d27fa365b681ca30e8f2184359cbd8c34ee90eb0
Fixed 'Bug 15962 - [regression] Solution-wide code-formatting settings
are no longer respected'
Changed paths:
M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs
Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs
===================================================================
@@ -41,6 +41,7 @@ internal class StyledSourceEditorOptions : ISourceEditorOptions
EventHandler changed;
IEnumerable<string> mimeTypes;
TextStylePolicy currentPolicy;
+ string lastMimeType;
public StyledSourceEditorOptions (Project styleParent, string mimeType)
{
@@ -51,10 +52,13 @@ public StyledSourceEditorOptions (Project styleParent, string mimeType)
get { return currentPolicy; }
}
+
public void UpdateStyleParent (Project styleParent, string mimeType)
{
- if (styleParent != null && policyContainer == styleParent.Policies)
+ if (styleParent != null && policyContainer == styleParent.Policies && mimeType == lastMimeType)
return;
+ lastMimeType = mimeType;
+
if (policyContainer != null)
policyContainer.PolicyChanged -= HandlePolicyChanged;
@@ -66,8 +70,8 @@ public void UpdateStyleParent (Project styleParent, string mimeType)
policyContainer = styleParent.Policies;
else
policyContainer = MonoDevelop.Projects.Policies.PolicyService.DefaultPolicies;
-
currentPolicy = policyContainer.Get<TextStylePolicy> (mimeTypes);
+
policyContainer.PolicyChanged += HandlePolicyChanged;
if (changed != null)
this.changed (this, EventArgs.Empty);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches