Designer: Handle opRemove notification for TControlSelection after copy/paste.

git-svn-id: trunk@64141 -
This commit is contained in:
juha 2020-11-15 16:57:11 +00:00
parent 8e52758eb7
commit 7a03920de9

View File

@ -1214,7 +1214,7 @@ begin
try try
// copy components to stream // copy components to stream
if not CopySelectionToStream(AllComponentsStream) then exit; if not CopySelectionToStream(AllComponentsStream) then exit;
SetLength(AllComponentText,AllComponentsStream.Size); SetLength(AllComponentText{%H-},AllComponentsStream.Size);
if AllComponentText<>'' then begin if AllComponentText<>'' then begin
AllComponentsStream.Position:=0; AllComponentsStream.Position:=0;
AllComponentsStream.Read(AllComponentText[1],length(AllComponentText)); AllComponentsStream.Read(AllComponentText[1],length(AllComponentText));
@ -3173,11 +3173,10 @@ begin
{$IFDEF VerboseDesigner} {$IFDEF VerboseDesigner}
DebugLn('[TDesigner.Notification] opRemove ',dbgsName(AComponent)); DebugLn('[TDesigner.Notification] opRemove ',dbgsName(AComponent));
{$ENDIF} {$ENDIF}
Assert(dfDuringDeletePers in FFlags, // Notification is usually triggered by TheFormEditor.DeleteComponent
'TDesigner.Notification: opRemove for '+dbgsName(AComponent)+' from outside.');
// Notification is always(?) triggered with TheFormEditor.DeleteComponent()
// in DoDeletePersistent. Don't call it again. // in DoDeletePersistent. Don't call it again.
//DoDeletePersistent(AComponent,false); if not (dfDuringDeletePers in FFlags) then // Needed eg. for TControlSelection
DoDeletePersistent(AComponent,false); // with copy/paste.
end; end;
end; end;