jcf: perform saving to file after execution of options dialog

git-svn-id: trunk@23122 -
This commit is contained in:
paul 2009-12-13 16:02:18 +00:00
parent b3de22c35b
commit bc2b775292
2 changed files with 15 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<JediCodeFormatSettings>
<WriteVersion> 2.43 </WriteVersion>
<WriteDateTime> 40159.6964775694 </WriteDateTime>
<WriteVersion> 2.44 </WriteVersion>
<WriteDateTime> 40160.959233287 </WriteDateTime>
<Description> format settings for use with Lazarus </Description>
<Obfuscate>
<Enabled> False </Enabled>
@ -32,6 +32,8 @@
<KeepCommentsWithCodeElsewhere> True </KeepCommentsWithCodeElsewhere>
<IndentElse> False </IndentElse>
<IndentCaseElse> True </IndentCaseElse>
<IndentNestedTypes> False </IndentNestedTypes>
<IndentVarAndConstInClass> False </IndentVarAndConstInClass>
</Indent>
<Spaces>
<TabsToSpaces> True </TabsToSpaces>

View File

@ -85,6 +85,7 @@ type
destructor Destroy; override;
class function GetGroupCaption: String; override;
class function GetInstance: TAbstractIDEOptions; override;
procedure DoAfterWrite; override;
procedure Read;
procedure ReadFromFile(const psFileName: string; const pbMustExist: boolean);
@ -250,6 +251,16 @@ begin
Result := FormatSettings;
end;
procedure TFormatSettings.DoAfterWrite;
begin
{ settings are now in need of saving }
Dirty := True;
{ check consistency of settings }
MakeConsistent;
{ save to file }
Write;
end;
const
CODEFORMAT_SETTINGS_SECTION = 'JediCodeFormatSettings';