Fixed: base key not applied correctly in registry settings
This commit is contained in:
parent
011897142c
commit
330ba47f5e
@ -206,10 +206,11 @@ begin
|
|||||||
pDefine := FFactory.GetDefine(FSection, AName);
|
pDefine := FFactory.GetDefine(FSection, AName);
|
||||||
|
|
||||||
if not InternalReadBool(AName, Result) then
|
if not InternalReadBool(AName, Result) then
|
||||||
|
begin
|
||||||
if Assigned(pDefine) then
|
if Assigned(pDefine) then
|
||||||
Result := pDefine.Value
|
Result := pDefine.Value
|
||||||
else
|
else
|
||||||
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName]);
|
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName])
|
||||||
|
|
||||||
if Assigned(pDefine) then
|
if Assigned(pDefine) then
|
||||||
begin
|
begin
|
||||||
@ -218,6 +219,7 @@ begin
|
|||||||
Result := vValue;
|
Result := vValue;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
function TX2Settings.ReadBool(const AName: String;
|
function TX2Settings.ReadBool(const AName: String;
|
||||||
const ADefault: Boolean): Boolean;
|
const ADefault: Boolean): Boolean;
|
||||||
|
@ -53,7 +53,7 @@ type
|
|||||||
procedure DeleteValue(const AName: String); override;
|
procedure DeleteValue(const AName: String); override;
|
||||||
public
|
public
|
||||||
constructor CreateInit(const AFactory: TX2SettingsFactory;
|
constructor CreateInit(const AFactory: TX2SettingsFactory;
|
||||||
const ASection: String;
|
const AKey, ASection: String;
|
||||||
const ARoot: Cardinal);
|
const ARoot: Cardinal);
|
||||||
destructor Destroy(); override;
|
destructor Destroy(); override;
|
||||||
end;
|
end;
|
||||||
@ -86,7 +86,7 @@ uses
|
|||||||
========================================}
|
========================================}
|
||||||
function TX2RegistrySettingsFactory.GetSection;
|
function TX2RegistrySettingsFactory.GetSection;
|
||||||
begin
|
begin
|
||||||
Result := TX2RegistrySettings.CreateInit(Self, ASection, FRoot);
|
Result := TX2RegistrySettings.CreateInit(Self, FKey, ASection, FRoot);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ begin
|
|||||||
FData := TRegistry.Create();
|
FData := TRegistry.Create();
|
||||||
FData.RootKey := ARoot;
|
FData.RootKey := ARoot;
|
||||||
|
|
||||||
FKey := IncludeTrailingPathDelimiter(FKey) +
|
FKey := IncludeTrailingPathDelimiter(AKey) +
|
||||||
StringReplace(ASection, '.', '\', [rfReplaceAll]);
|
StringReplace(ASection, '.', '\', [rfReplaceAll]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user