From 747467208a1a45dd2e52898755100036d1f03ea4 Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 26 Jun 2014 18:12:40 +0800 Subject: [PATCH] Render immediately when auto-render is ticked --- MacDown/Code/Document/MPDocument.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MacDown/Code/Document/MPDocument.m b/MacDown/Code/Document/MPDocument.m index 4001c9f8..6dac125b 100644 --- a/MacDown/Code/Document/MPDocument.m +++ b/MacDown/Code/Document/MPDocument.m @@ -70,6 +70,7 @@ @interface MPDocument () @property BOOL currentSmartyPantsFlag; @property BOOL currentSyntaxHighlighting; @property BOOL currentMathJax; +@property BOOL currentManualRender; @property (copy) NSString *currentHtml; @property (copy) NSString *currentStyleName; @property (strong) NSTimer *parseDelayTimer; @@ -755,6 +756,7 @@ - (void)render self.currentStyleName = styleName; self.currentSyntaxHighlighting = self.preferences.htmlSyntaxHighlighting; self.currentMathJax = self.preferences.htmlMathJax; + self.currentManualRender = self.preferences.markdownManualRender; } - (void)renderIfPreferencesChanged @@ -762,7 +764,10 @@ - (void)renderIfPreferencesChanged if (self.preferences.htmlStyleName != self.currentStyleName || (self.preferences.htmlSyntaxHighlighting != self.currentSyntaxHighlighting) - || (self.preferences.htmlMathJax != self.currentMathJax)) + || (self.preferences.htmlMathJax != self.currentMathJax) + || (!self.preferences.markdownManualRender + && (self.preferences.markdownManualRender + != self.currentManualRender))) [self render]; }