mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 19:35:58 +02:00
IDEIntf: saving formid names
git-svn-id: trunk@26213 -
This commit is contained in:
parent
9c8f207995
commit
f6f6a3aaea
@ -916,16 +916,16 @@ procedure TSimpleWindowLayoutList.LoadFromConfig(Config: TConfigStorage;
|
|||||||
const Path: string);
|
const Path: string);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
Name: String;
|
ID: String;
|
||||||
begin
|
begin
|
||||||
// do not clear, just add/replace the values from the config
|
// do not clear, just add/replace the values from the config
|
||||||
|
|
||||||
// create new windows
|
// create new windows
|
||||||
i := Config.GetValue(Path+'Desktop/FormIdCount', 0);
|
i := Config.GetValue(Path+'Desktop/FormIdCount', 0);
|
||||||
while i > 0 do begin
|
while i > 0 do begin
|
||||||
Name := Config.GetValue(Path+'Desktop/FormIdList/a'+IntToStr(i), '');
|
ID := Config.GetValue(Path+'Desktop/FormIdList/a'+IntToStr(i), '');
|
||||||
if (Name <> '') and (IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(Name) = nil) then
|
if (ID <> '') and (IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(ID) = nil) then
|
||||||
CreateWindowLayout(Name);
|
CreateWindowLayout(ID);
|
||||||
dec(i);
|
dec(i);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -938,8 +938,9 @@ procedure TSimpleWindowLayoutList.SaveToConfig(Config: TConfigStorage;
|
|||||||
var i: integer;
|
var i: integer;
|
||||||
begin
|
begin
|
||||||
Config.SetDeleteValue(Path+'FormIdCount',Count,0);
|
Config.SetDeleteValue(Path+'FormIdCount',Count,0);
|
||||||
|
debugln(['TSimpleWindowLayoutList.SaveToConfig ',Count]);
|
||||||
for i:=0 to Count-1 do begin
|
for i:=0 to Count-1 do begin
|
||||||
Config.SetDeleteValue(Path+'Desktop/FormIdList/a'+IntToStr(i+1),Items[i].Name,'');
|
Config.SetDeleteValue(Path+'Desktop/FormIdList/a'+IntToStr(i+1),Items[i].FormID,'');
|
||||||
Items[i].SaveToConfig(Config,Path);
|
Items[i].SaveToConfig(Config,Path);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user