From 83f36b4506586361778d5202d2da91932cceead2 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 25 May 2010 11:53:06 +0000 Subject: [PATCH] EditorOptions, fix importing old background color git-svn-id: trunk@25637 - --- ide/editoroptions.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index 9de22fda64..ef192e8210 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -4338,6 +4338,15 @@ begin AttributeAtPos[i].LoadFromXml(aXMLConfig, TmpPath, Def, FormatVersion); end; FreeAndNil(EmptyDef); + + // Version 5 and before stored the global background on the Whitespace attribute. + // If a whiespace Attribute was loaded (UseSchemeGlobals=false) then copy it + if (FormatVersion <= 5) and (DefaultAttribute <> nil) and + (FHighlighter <> nil) and (FHighlighter.WhitespaceAttribute <> nil) and + (Attribute[Highlighter.WhitespaceAttribute.Name] <> nil) and + (not Attribute[Highlighter.WhitespaceAttribute.Name].UseSchemeGlobals) + then + DefaultAttribute.Background := Attribute[Highlighter.WhitespaceAttribute.Name].Background; end; procedure TColorSchemeLanguage.SaveToXml(aXMLConfig: TRttiXMLConfig; aPath: String;