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);
|
||||
|
||||
if not InternalReadBool(AName, Result) then
|
||||
begin
|
||||
if Assigned(pDefine) then
|
||||
Result := pDefine.Value
|
||||
else
|
||||
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName]);
|
||||
raise EX2SettingsUndefined.CreateFmt(RSUndefined, [AName])
|
||||
|
||||
if Assigned(pDefine) then
|
||||
begin
|
||||
@ -218,6 +219,7 @@ begin
|
||||
Result := vValue;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TX2Settings.ReadBool(const AName: String;
|
||||
const ADefault: Boolean): Boolean;
|
||||
|
@ -53,7 +53,7 @@ type
|
||||
procedure DeleteValue(const AName: String); override;
|
||||
public
|
||||
constructor CreateInit(const AFactory: TX2SettingsFactory;
|
||||
const ASection: String;
|
||||
const AKey, ASection: String;
|
||||
const ARoot: Cardinal);
|
||||
destructor Destroy(); override;
|
||||
end;
|
||||
@ -86,7 +86,7 @@ uses
|
||||
========================================}
|
||||
function TX2RegistrySettingsFactory.GetSection;
|
||||
begin
|
||||
Result := TX2RegistrySettings.CreateInit(Self, ASection, FRoot);
|
||||
Result := TX2RegistrySettings.CreateInit(Self, FKey, ASection, FRoot);
|
||||
end;
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ begin
|
||||
FData := TRegistry.Create();
|
||||
FData.RootKey := ARoot;
|
||||
|
||||
FKey := IncludeTrailingPathDelimiter(FKey) +
|
||||
FKey := IncludeTrailingPathDelimiter(AKey) +
|
||||
StringReplace(ASection, '.', '\', [rfReplaceAll]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user