From 233090854bda9ebb8c942bf2446d6c527037a3a2 Mon Sep 17 00:00:00 2001 From: zeljko Date: Fri, 24 Feb 2012 15:34:45 +0000 Subject: [PATCH] IDE: fix imposibility to restore minimized window when ide restarts. issue #19769 git-svn-id: trunk@35583 - --- ideintf/idewindowintf.pas | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ideintf/idewindowintf.pas b/ideintf/idewindowintf.pas index d2750aa1e0..230955f711 100644 --- a/ideintf/idewindowintf.pas +++ b/ideintf/idewindowintf.pas @@ -1626,10 +1626,18 @@ begin 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; + AForm.Visible := True; + if (AForm.WindowState in [wsMinimized]) then + begin + if BringToFront then + begin + // issue #19769 + if AForm.Visible and not (fsModal in AForm.FormState) then + AForm.Visible := False; + AForm.ShowOnTop; + end; + end; if (csDesigning in AForm.ComponentState) and (AForm.Designer <> nil) then AForm.Visible := ARestoreVisible;