From c84347984eb0d338ee75d23b09dd510e0e08a6ea Mon Sep 17 00:00:00 2001 From: paul Date: Wed, 7 Jan 2009 13:07:17 +0000 Subject: [PATCH] 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 - --- ideintf/componenttreeview.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ideintf/componenttreeview.pas b/ideintf/componenttreeview.pas index a20328c56c..169d49c4da 100644 --- a/ideintf/componenttreeview.pas +++ b/ideintf/componenttreeview.pas @@ -195,9 +195,10 @@ begin while Assigned(Node) do begin 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 - if AcceptControl and AcceptContainer then + if AcceptControl then begin while Assigned(AContainer) do begin