From 27e5a6b7234edd6a14eb76b39d81f367943afdac Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 15 Oct 2010 00:45:02 +0000 Subject: [PATCH] Editor-opts: clean-up, improved initialization git-svn-id: trunk@27711 - --- ide/editoroptions.pp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index a07542fe7a..972aacb036 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -1201,7 +1201,6 @@ function StrToLazSyntaxHighlighter(const s: String): TLazSyntaxHighlighter; function ExtensionToLazSyntaxHighlighter(Ext: String): TLazSyntaxHighlighter; function FilenameToLazSyntaxHighlighter(Filename: String): TLazSyntaxHighlighter; procedure RepairEditorFontHeight(var FontHeight: integer); -//procedure CopyHiLightAttributeValues(Src, Dest: TSynHighlightElement); function BuildBorlandDCIFile(ACustomSynAutoComplete: TCustomSynAutoComplete): Boolean; function ColorSchemeFactory: TColorSchemeFactory; @@ -1581,17 +1580,6 @@ begin Result[i] := '_'; end; -procedure CopyHiLightAttributeValues(Src, Dest: TSynHighlightElement); -begin - Dest.Background := Src.Background; - Dest.Foreground := Src.Foreground; - Dest.FrameColor := Src.FrameColor; - Dest.FrameEdges := Src.FrameEdges; - Dest.FrameStyle := Src.FrameStyle; - Dest.Style := Src.Style; - Dest.StyleMask := Src.StyleMask; -end; - { TRttiXMLConfig } procedure TRttiXMLConfig.WriteObject(Path: String; Obj: TPersistent; @@ -4348,7 +4336,10 @@ begin aDest.FrameEdges := Src.FrameEdges; aDest.FrameStyle := Src.FrameStyle; aDest.Style := Src.Style; - aDest.StyleMask := Src.StyleMask; + if hafStyleMask in Src.Features then + aDest.StyleMask := Src.StyleMask + else + aDest.StyleMask := [low(TFontStyle)..high(TFontStyle)]; aDest.EndUpdate; end;