mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 01:29:20 +02:00
IDE: paste components: update TControl.Caption
git-svn-id: trunk@37640 -
This commit is contained in:
parent
082541ea2d
commit
d91e9ccb16
@ -1129,11 +1129,13 @@ var
|
||||
if (NewComponents.IndexOf(OverlappedControl)<0)
|
||||
and (OverlappedControl.Left=P.X)
|
||||
and (OverlappedControl.Top=P.Y) then begin
|
||||
// overlaps with an old control => move
|
||||
inc(P.X,NonVisualCompWidth);
|
||||
inc(P.Y,NonVisualCompWidth);
|
||||
if (P.X>AParent.ClientWidth-AControl.Width)
|
||||
or (P.Y>AParent.ClientHeight-AControl.Height) then
|
||||
break;
|
||||
// restart check
|
||||
i:=AParent.ControlCount-1;
|
||||
end else
|
||||
dec(i);
|
||||
|
@ -1398,7 +1398,19 @@ begin
|
||||
end;
|
||||
|
||||
procedure TJITComponentList.ReadComponentsProc(AComponent: TComponent);
|
||||
var
|
||||
aControl: TControl;
|
||||
aCaption: TCaption;
|
||||
begin
|
||||
if (AComponent.Name<>'') and (AComponent is TControl) then begin
|
||||
aControl:=TControl(AComponent);
|
||||
aCaption:=aControl.Caption;
|
||||
if (aCaption<>'') and (fRenameList[aCaption]=AComponent.Name) then begin
|
||||
// caption is the old name of the component
|
||||
// component was renamed => change caption too
|
||||
aControl.Caption:=AComponent.Name;
|
||||
end;
|
||||
end;
|
||||
if fReadComponents<>nil then
|
||||
fReadComponents.Add(AComponent);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user