IDE: apply window settings again after form was destroyed

git-svn-id: trunk@26114 -
This commit is contained in:
mattias 2010-06-14 15:15:56 +00:00
parent 73e5c20887
commit 3fa7522110

View File

@ -447,8 +447,10 @@ procedure TSimpleWindowLayout.Notification(AComponent: TComponent;
begin begin
inherited Notification(AComponent, Operation); inherited Notification(AComponent, Operation);
if Operation=opRemove then begin if Operation=opRemove then begin
if fForm=AComponent then if fForm=AComponent then begin
fForm:=nil; fForm:=nil;
Applied:=false;
end;
end; end;
end; end;
@ -513,6 +515,7 @@ begin
fFormID := Form.Name; fFormID := Form.Name;
FFormCaption := Form.Caption; FFormCaption := Form.Caption;
FreeNotification(Form); FreeNotification(Form);
Applied:=false;
end; end;
end; end;
@ -746,7 +749,7 @@ begin
ALayout.Form:=AForm; ALayout.Form:=AForm;
if ALayout.Applied then exit; if ALayout.Applied then exit;
ALayout.Applied:=true; ALayout.Applied:=true;
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore']); debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID]);
WindowType:=NonModalIDEFormIDToEnum(ALayout.FormID); WindowType:=NonModalIDEFormIDToEnum(ALayout.FormID);
SubIndex := -1; SubIndex := -1;