ide/CodeEditor: Fixed bad font when applying new font
authorJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 14:57:36 +0000 (10:57 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 4 Aug 2016 14:57:36 +0000 (10:57 -0400)
- Was causing margin to be reduced

ide/src/ide.ec

index 815c3b0..766f5a6 100644 (file)
@@ -461,8 +461,12 @@ class IDEWorkSpace : Window
          for(ce = (CodeEditor)firstChild; ce; ce = (CodeEditor)ce.next)
             if(ce._class == class(CodeEditor))
             {
-               ce.font = { codeFont.faceName, codeFont.size, codeFont.bold, codeFont.italic };
-               ce.editBox.font = ce.font;
+               FontResource font;
+               font = { codeFont.faceName, codeFont.size, codeFont.bold, codeFont.italic };
+               incref font;
+               delete *&ce.font;
+               *&ce.font = font;
+               ce.editBox.font = font;
                ce.OnPostCreate();
             }
       }