ideintf: don't allow to drop controls on a parent which does not support that child class (part of bug #0010378)

git-svn-id: trunk@18187 -
This commit is contained in:
paul 2009-01-07 13:07:17 +00:00
parent ed6e13b21e
commit c84347984e

View File

@ -195,9 +195,10 @@ begin
while Assigned(Node) do while Assigned(Node) do
begin begin
AnObject := TObject(Node.Data); AnObject := TObject(Node.Data);
AcceptControl := AcceptControl and (AnObject is TControl); AcceptControl := AcceptControl and (AnObject is TControl) and
AContainer.CheckChildClassAllowed(AnObject.ClassType, False);
// Check if one of the parent of the container is the control itself // Check if one of the parent of the container is the control itself
if AcceptControl and AcceptContainer then if AcceptControl then
begin begin
while Assigned(AContainer) do while Assigned(AContainer) do
begin begin