mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-25 10:40:38 +01:00
IDE: idewindowintf: do not change designed form visible property.It can be changed only in OI while designing. issue #20602
git-svn-id: trunk@35581 -
This commit is contained in:
parent
a9cbd3a292
commit
f96b78a3f1
@ -1526,6 +1526,7 @@ var
|
||||
DockSibling: TCustomForm;
|
||||
DockSiblingBounds: TRect;
|
||||
Offset: TPoint;
|
||||
ARestoreVisible: Boolean;
|
||||
begin
|
||||
{$IFDEF VerboseIDEDocking}
|
||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow Form=',DbgSName(AForm),' ',BringToFront,
|
||||
@ -1611,12 +1612,27 @@ begin
|
||||
end;
|
||||
finally
|
||||
if (AForm.WindowState in [wsNormal,wsMaximized]) and BringToFront then
|
||||
AForm.ShowOnTop
|
||||
else
|
||||
begin
|
||||
// do not change Visible property while designing form. issue #20602
|
||||
// we save it into ARestoreVisible before any changes from here.
|
||||
if (csDesigning in AForm.ComponentState) and (AForm.Designer <> nil) then
|
||||
ARestoreVisible := AForm.Visible;
|
||||
|
||||
AForm.ShowOnTop;
|
||||
|
||||
if (csDesigning in AForm.ComponentState) and (AForm.Designer <> nil) then
|
||||
AForm.Visible := ARestoreVisible;
|
||||
end else
|
||||
begin
|
||||
if (csDesigning in AForm.ComponentState) and (AForm.Designer <> nil) then
|
||||
ARestoreVisible := AForm.Visible;
|
||||
AForm.Visible:=true;
|
||||
|
||||
if BringToFront and (AForm.WindowState in [wsMinimized]) then
|
||||
AForm.WindowState := wsNormal;
|
||||
|
||||
if (csDesigning in AForm.ComponentState) and (AForm.Designer <> nil) then
|
||||
AForm.Visible := ARestoreVisible;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user