mirror of https://gitlab.com/basile.b/dexed.git
fix, TCECustimWritableComponent, prop hasLoaded could be erroneously set to true
This commit is contained in:
parent
104d6bc3b6
commit
9cca5e1b12
|
@ -107,11 +107,21 @@ begin
|
|||
end;
|
||||
|
||||
procedure TCustomWritableComponent.loadFromFile(const aFilename: string);
|
||||
var
|
||||
err: boolean;
|
||||
begin
|
||||
fHasLoaded := true;
|
||||
err := false;
|
||||
fHasLoaded := false;
|
||||
beforeLoad;
|
||||
setFilename(aFilename);
|
||||
customLoadFromFile(aFilename);
|
||||
try
|
||||
customLoadFromFile(aFilename);
|
||||
except
|
||||
err := true;
|
||||
fHasLoaded := false;
|
||||
end;
|
||||
if not err then
|
||||
fHasLoaded := true;
|
||||
afterLoad;
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
|
Loading…
Reference in New Issue