LCL: CloseQuery: query docked forms

git-svn-id: trunk@23033 -
This commit is contained in:
mattias 2009-12-08 16:00:32 +00:00
parent efd8836a89
commit 0eee01a3b4

View File

@ -1719,10 +1719,19 @@ end;
TCustomForm Method CloseQuery
------------------------------------------------------------------------------}
function TCustomForm.CloseQuery: boolean;
var
i: Integer;
begin
if FormStyle = fsMDIForm then
begin
// Query children forms whether we can close
i:=0;
while i<DockClientCount do begin
if (DockClients[i] is TCustomForm)
and not (TCustomForm(DockClients[i]).CloseQuery) then
exit(false);
inc(i);
end;
// TODO: mdi logic
end;
Result := True;