mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 19:59:14 +02:00
IDEIntf: fixed saving formidcount
git-svn-id: trunk@26214 -
This commit is contained in:
parent
f6f6a3aaea
commit
d716155433
@ -698,6 +698,7 @@ begin
|
|||||||
fWindowState:=StrToIDEWindowState(Config.GetValue(
|
fWindowState:=StrToIDEWindowState(Config.GetValue(
|
||||||
P+'WindowState/Value',IDEWindowStateNames[fWindowState]));
|
P+'WindowState/Value',IDEWindowStateNames[fWindowState]));
|
||||||
FVisible:=Config.GetValue(P+'Visible/Value',false);
|
FVisible:=Config.GetValue(P+'Visible/Value',false);
|
||||||
|
//debugln(['TSimpleWindowLayout.LoadFromConfig ',FormID,' ',Left,',',Top,',',Width,',',Height]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimpleWindowLayout.SaveToConfig(Config: TConfigStorage;
|
procedure TSimpleWindowLayout.SaveToConfig(Config: TConfigStorage;
|
||||||
@ -803,6 +804,7 @@ end;
|
|||||||
|
|
||||||
procedure TSimpleWindowLayout.Clear;
|
procedure TSimpleWindowLayout.Clear;
|
||||||
begin
|
begin
|
||||||
|
//debugln(['TSimpleWindowLayout.Clear ',FormID]);
|
||||||
fWindowPlacement:=fDefaultWindowPlacement;
|
fWindowPlacement:=fDefaultWindowPlacement;
|
||||||
fLeft:=0;
|
fLeft:=0;
|
||||||
fTop:=0;
|
fTop:=0;
|
||||||
@ -922,8 +924,10 @@ begin
|
|||||||
|
|
||||||
// create new windows
|
// create new windows
|
||||||
i := Config.GetValue(Path+'Desktop/FormIdCount', 0);
|
i := Config.GetValue(Path+'Desktop/FormIdCount', 0);
|
||||||
|
//debugln(['TSimpleWindowLayoutList.LoadFromConfig ',i]);
|
||||||
while i > 0 do begin
|
while i > 0 do begin
|
||||||
ID := Config.GetValue(Path+'Desktop/FormIdList/a'+IntToStr(i), '');
|
ID := Config.GetValue(Path+'Desktop/FormIdList/a'+IntToStr(i), '');
|
||||||
|
//debugln(['TSimpleWindowLayoutList.LoadFromConfig ',i,' ',ID]);
|
||||||
if (ID <> '') and (IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(ID) = nil) then
|
if (ID <> '') and (IDEWindowCreators.SimpleLayoutStorage.ItemByFormID(ID) = nil) then
|
||||||
CreateWindowLayout(ID);
|
CreateWindowLayout(ID);
|
||||||
dec(i);
|
dec(i);
|
||||||
@ -937,8 +941,8 @@ procedure TSimpleWindowLayoutList.SaveToConfig(Config: TConfigStorage;
|
|||||||
const Path: string);
|
const Path: string);
|
||||||
var i: integer;
|
var i: integer;
|
||||||
begin
|
begin
|
||||||
Config.SetDeleteValue(Path+'FormIdCount',Count,0);
|
Config.SetDeleteValue(Path+'Desktop/FormIdCount',Count,0);
|
||||||
debugln(['TSimpleWindowLayoutList.SaveToConfig ',Count]);
|
//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].FormID,'');
|
Config.SetDeleteValue(Path+'Desktop/FormIdList/a'+IntToStr(i+1),Items[i].FormID,'');
|
||||||
Items[i].SaveToConfig(Config,Path);
|
Items[i].SaveToConfig(Config,Path);
|
||||||
@ -1019,7 +1023,7 @@ begin
|
|||||||
if ALayout.Applied then exit;
|
if ALayout.Applied then exit;
|
||||||
ALayout.Applied:=true;
|
ALayout.Applied:=true;
|
||||||
{$IFDEF VerboseIDEDocking}
|
{$IFDEF VerboseIDEDocking}
|
||||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID,' ',IDEWindowPlacementNames[ALayout.WindowPlacement]]);
|
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID,' ',IDEWindowPlacementNames[ALayout.WindowPlacement],' Valid=',ALayout.CustomCoordinatesAreValid,' ',ALayout.Left,',',ALayout.Top,',',ALayout.Width,',',ALayout.Height]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
case ALayout.WindowPlacement of
|
case ALayout.WindowPlacement of
|
||||||
|
Loading…
Reference in New Issue
Block a user