[mono/monodevelop] 4a57c750: Fixed 'Bug 15423 - Zooming text size changes tab width'.

Mike Krüger ([email protected]) <[email protected]>
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <00000141c4b9a64e-24ed7810-7fb4-4935-8cb5-e8ba04cac51f-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/monodevelop
  Compare: https://github.com/mono/monodevelop/compare/2c386c845949...4a57c750b608

   Commit: 4a57c750b608bb04beef68f304df9ee84deaeb84
   Author: Mike Krüger <[email protected]> (mkrueger)
     Date: 2013-10-17 04:41:34 GMT
      URL: https://github.com/mono/monodevelop/commit/4a57c750b608bb04beef68f304df9ee84deaeb84

Fixed 'Bug 15423 - Zooming text size changes tab width'.

Changed paths:
  M main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs

Modified: main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/StyledSourceEditorOptions.cs
===================================================================
@@ -53,6 +53,8 @@ public StyledSourceEditorOptions (Project styleParent, string mimeType)
 
 		public void UpdateStyleParent (Project styleParent, string mimeType)
 		{
+			if (styleParent != null && policyContainer == styleParent.Policies)
+				return;
 			if (policyContainer != null)
 				policyContainer.PolicyChanged -= HandlePolicyChanged;
 
@@ -67,12 +69,15 @@ public void UpdateStyleParent (Project styleParent, string mimeType)
 
 			currentPolicy = policyContainer.Get<TextStylePolicy> (mimeTypes);
 			policyContainer.PolicyChanged += HandlePolicyChanged;
+			if (changed != null)
+				this.changed (this, EventArgs.Empty);
 		}
 
 		void HandlePolicyChanged (object sender, MonoDevelop.Projects.Policies.PolicyChangedEventArgs args)
 		{
 			currentPolicy = policyContainer.Get<TextStylePolicy> (mimeTypes);
-			this.changed (this, EventArgs.Empty);
+			if (changed != null)
+				this.changed (this, EventArgs.Empty);
 		}
 
 		public bool OverrideDocumentEolMarker {
_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.