mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-06 12:18:17 +02:00
IDE: RestoreSimpleLayout: trigger layoutchanged only if something changed
git-svn-id: trunk@49798 -
This commit is contained in:
parent
5195829561
commit
f228ab12a3
@ -2041,7 +2041,7 @@ begin
|
||||
// clean up
|
||||
FreeAndNil(fTreeNameToDocker);
|
||||
ControlNames.Free;
|
||||
// commit (this can raise an exception)
|
||||
// commit (this can raise an exception, when it triggers events)
|
||||
EnableAllAutoSizing;
|
||||
end;
|
||||
{$IFDEF VerboseAnchorDockRestore}
|
||||
|
@ -2239,22 +2239,26 @@ var
|
||||
i: Integer;
|
||||
ALayout: TSimpleWindowLayout;
|
||||
AForm: TCustomForm;
|
||||
HasChanged: Boolean;
|
||||
begin
|
||||
if IDEDockMaster=nil then
|
||||
begin
|
||||
HasChanged:=false;
|
||||
for i:=SimpleLayoutStorage.Count-1 downto 0 do//loop down in order to keep z-order of the forms
|
||||
begin
|
||||
ALayout:=SimpleLayoutStorage[i];
|
||||
AForm:=GetForm(ALayout.FormID,ALayout.Visible);
|
||||
if AForm=nil then Continue;
|
||||
HasChanged:=true;
|
||||
ALayout.Apply(True);
|
||||
if ALayout.Visible or (AForm=Application.MainForm) then
|
||||
ShowForm(AForm,true)
|
||||
else if AForm.Visible then
|
||||
AForm.Close;
|
||||
end;
|
||||
end;
|
||||
if HasChanged then
|
||||
LayoutChanged;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TIDEWindowCreatorList.GetScreenrectForDefaults: TRect;
|
||||
|
Loading…
Reference in New Issue
Block a user