mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 07:29:27 +02:00
xmlcfg: fixed reading values of root node
git-svn-id: trunk@25844 -
This commit is contained in:
parent
6fef62de1a
commit
8ab26fb242
@ -509,9 +509,10 @@ begin
|
||||
PathIndex:=0;
|
||||
Result:=GetPathNodeCache(PathIndex);
|
||||
if Result=nil then begin
|
||||
Result := doc.DocumentElement;
|
||||
Result := TDOMElement(doc.FindNode('CONFIG'));
|
||||
SetPathNodeCache(PathIndex,Result);
|
||||
end;
|
||||
if PathLen=0 then exit;
|
||||
StartPos:=1;
|
||||
while (Result<>nil) do begin
|
||||
EndPos:=StartPos;
|
||||
@ -580,6 +581,7 @@ begin
|
||||
end;
|
||||
|
||||
doc:=nil;
|
||||
//debugln(['TXMLConfig.SetFilename ',not fDoNotLoadFromFile,' ',FileExistsCached(Filename)]);
|
||||
if (not fDoNotLoadFromFile) and FileExistsCached(Filename) then
|
||||
ReadXMLFile(doc,Filename)
|
||||
else if fAutoLoadFromSource<>'' then begin
|
||||
@ -601,6 +603,7 @@ begin
|
||||
doc := TXMLDocument.Create;
|
||||
|
||||
cfg :=TDOMElement(doc.FindNode('CONFIG'));
|
||||
//debugln(['TXMLConfig.SetFilename ',DbgSName(cfg)]);
|
||||
if not Assigned(cfg) then begin
|
||||
cfg := doc.CreateElement('CONFIG');
|
||||
doc.AppendChild(cfg);
|
||||
|
@ -118,7 +118,7 @@ end;
|
||||
procedure LoadIDEWindowHelp;
|
||||
var
|
||||
Filename: String;
|
||||
Config: TConfigStorage;
|
||||
Config: TXMLOptionsStorage;
|
||||
begin
|
||||
if IDEWindowHelpNodes=nil then
|
||||
IDEWindowHelpNodes:=TIWHelpTree.Create;
|
||||
|
Loading…
Reference in New Issue
Block a user