mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 10:55:56 +02:00
Converter: Clear old left-over values when saving configuration. (Remove a hack)
git-svn-id: trunk@46868 -
This commit is contained in:
parent
2da65785f9
commit
934571346f
@ -231,8 +231,9 @@ var
|
|||||||
Node: TAVLTreeNode;
|
Node: TAVLTreeNode;
|
||||||
Item: PStringToStringTreeItem;
|
Item: PStringToStringTreeItem;
|
||||||
SubPath: String;
|
SubPath: String;
|
||||||
i, j: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
Config.DeletePath(Path); // Make sure there are no old leftover items.
|
||||||
Config.SetDeleteValue(Path+'Count', Tree.Tree.Count, 0);
|
Config.SetDeleteValue(Path+'Count', Tree.Tree.Count, 0);
|
||||||
Node:=Tree.Tree.FindLowest;
|
Node:=Tree.Tree.FindLowest;
|
||||||
i:=0;
|
i:=0;
|
||||||
@ -244,11 +245,6 @@ begin
|
|||||||
Node:=Tree.Tree.FindSuccessor(Node);
|
Node:=Tree.Tree.FindSuccessor(Node);
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
// Remove leftover items in case the list has become shorter.
|
|
||||||
for j:=i to i+10 do begin
|
|
||||||
SubPath:=Path+'Item'+IntToStr(j)+'/';
|
|
||||||
Config.DeletePath(SubPath);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Load and store configuration in TFuncsAndCategories :
|
// Load and store configuration in TFuncsAndCategories :
|
||||||
|
Loading…
Reference in New Issue
Block a user