IDE: change encoding on disk: update overide list

git-svn-id: trunk@23591 -
This commit is contained in:
mattias 2010-01-29 09:37:05 +00:00
parent 1c052ae3c6
commit 77a6f454ed

View File

@ -4618,12 +4618,15 @@ begin
// change file
SrcEdit.CodeBuffer.DiskEncoding:=NewEncoding;
SrcEdit.CodeBuffer.Modified:=true;
// set override
InputHistories.FileEncodings[SrcEdit.CodeBuffer.Filename]:=NewEncoding;
DebugLn(['TSourceNotebook.EncodingClicked Change file to ',SrcEdit.CodeBuffer.DiskEncoding]);
if (not SrcEdit.CodeBuffer.IsVirtual)
and (LazarusIDE.DoSaveEditorFile(SrcEdit.PageIndex,[])<>mrOk) then begin
DebugLn(['TSourceNotebook.EncodingClicked LazarusIDE.DoSaveEditorFile failed']);
end;
end else if CurResult=mrOK then begin
// reopen with another encoding
if SrcEdit.Modified then begin
if IDEQuestionDialog(lisAbandonChanges,
Format(lisAllYourModificationsToWillBeLostAndTheFileReopened, [