fix, editor modified file, invalid content could be paste

if new version of the file was an empty file
This commit is contained in:
Basile Burg 2015-06-03 14:40:47 +02:00
parent 2902b26310
commit a1672f7187
1 changed files with 5 additions and 2 deletions

View File

@ -852,9 +852,12 @@ begin
str := TStringList.Create; str := TStringList.Create;
try try
str.LoadFromFile(fFilename); str.LoadFromFile(fFilename);
DoCopyToClipboard(str.Text);
ClearAll; ClearAll;
PasteFromClipboard; if str.Count > 0 then
begin
DoCopyToClipboard(str.Text);
PasteFromClipboard;
end;
fModified := true; fModified := true;
finally finally
str.Free; str.Free;