mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 22:09:28 +02:00
ideintf: component treeview: don't allow to drag-drop component to the csInline components
git-svn-id: trunk@21255 -
This commit is contained in:
parent
6466ed6830
commit
198d41e001
@ -38,7 +38,7 @@ type
|
||||
private
|
||||
FComponentList: TBackupComponentList;
|
||||
FPropertyEditorHook: TPropertyEditorHook;
|
||||
FImageList :TImageList;
|
||||
FImageList: TImageList;
|
||||
function GetSelection: TPersistentSelectionList;
|
||||
procedure SetPropertyEditorHook(const AValue: TPropertyEditorHook);
|
||||
procedure SetSelection(const NewSelection: TPersistentSelectionList);
|
||||
@ -236,10 +236,11 @@ begin
|
||||
begin
|
||||
AnObject := TObject(Node.Data);
|
||||
if (AnObject is TWinControl) and
|
||||
(csAcceptsControls in TWinControl(AnObject).ControlStyle)
|
||||
and (TWinControl(AnObject).Owner<>nil) // TReader/TWriter only supports this
|
||||
and (TWinControl(AnObject).Owner.Owner=nil) // TReader/TWriter only supports this
|
||||
then begin
|
||||
(csAcceptsControls in TWinControl(AnObject).ControlStyle) and
|
||||
not (csInline in TWinControl(AnObject).ComponentState) and // Because of TWriter, you can not put a control onto an csInline control (e.g. on a frame).
|
||||
(TWinControl(AnObject).Owner<>nil) and // TReader/TWriter only supports this
|
||||
(TWinControl(AnObject).Owner.Owner=nil) then // TReader/TWriter only supports this
|
||||
begin
|
||||
AContainer := TWinControl(AnObject);
|
||||
AcceptContainer := True;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user