lcl: TWinControl.InsertControl fixed position in Controls, widgetsets do not support that yet, issue #25405

git-svn-id: branches/fixes_1_4@47376 -
This commit is contained in:
mattias 2015-01-13 18:31:55 +00:00
parent 616bd7e127
commit ee2dd46d22

View File

@ -6035,11 +6035,13 @@ end;
procedure TWinControl.Insert(AControl: TControl; Index: integer);
begin
if AControl = nil then exit;
if AControl.FParent<>nil then
raise EInvalidOperation.Create('control has already a parent');
if AControl = Self then
raise EInvalidOperation.Create(rsAControlCanNotHaveItselfAsParent);
ListAdd(FControls, AControl);
ListInsert(FControls, Index, AControl);
if AControl is TWinControl then
begin
ListAdd(FTabList, AControl);