fix, editor cache was not properly reloaded when a document is reopnened

automatically at startup
This commit is contained in:
Basile Burg 2015-11-29 17:58:24 +01:00
parent ea9b3af4dd
commit 144fd79788
1 changed files with 13 additions and 4 deletions

View File

@ -91,6 +91,7 @@ type
fFilename: string;
fModified: boolean;
fFileDate: double;
fCacheLoaded: boolean;
fIsDSource: boolean;
fIsTxtFile: boolean;
fIsConfig: boolean;
@ -526,7 +527,12 @@ procedure TCESynMemo.SetVisible(Value: Boolean);
begin
inherited;
if Value then
setFocus
begin
setFocus;
if not fCacheLoaded then
loadCache;
fCacheLoaded := true;
end
else begin
fDDocWin.Hide;
fCallTipWin.Hide;
@ -712,10 +718,13 @@ begin
fFilename := aFilename;
FileAge(fFilename, fFileDate);
//
loadCache;
//
fModified := false;
if Showing then setFocus;
if Showing then
begin
setFocus;
loadCache;
fCacheLoaded := true;
end;
subjDocChanged(TCEMultiDocSubject(fMultiDocSubject), self);
end;