IDE: double click on component palette invokes selection dialog

git-svn-id: trunk@20489 -
This commit is contained in:
mattias 2009-06-06 18:56:56 +00:00
parent 5306762a21
commit 8edea32cee

View File

@ -241,7 +241,12 @@ begin
//debugln('TComponentPalette.ComponentBtnDblClick ',TComponent(Sender).Name);
if SelectButton(TComponent(Sender)) and (FSelected<>nil) then begin
if FormEditingHook<>nil then begin
TypeClass:=FSelected.ComponentClass;
if assigned(FSelected.OnGetCreationClass) then
begin
FSelected.OnGetCreationClass(Self,TypeClass);
if TypeClass=nil then exit;
end else
TypeClass:=FSelected.ComponentClass;
ParentCI:=FormEditingHook.GetDefaultComponentParent(TypeClass);
if ParentCI=nil then exit;
if not FormEditingHook.GetDefaultComponentPosition(TypeClass,ParentCI,X,Y)