mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 04:53:39 +02:00
Designer: When removing a component, remove its owned item declarations in source. Issue #38731.
git-svn-id: trunk@64985 -
This commit is contained in:
parent
f9c4dc1d8f
commit
1b7c39ba12
@ -82,7 +82,6 @@ type
|
||||
dfHasSized,
|
||||
dfNeedPainting,
|
||||
dfDuringPaintControl,
|
||||
dfDuringDeletePers,
|
||||
dfDestroyingForm,
|
||||
dfShowEditorHints,
|
||||
dfShowComponentCaptions,
|
||||
@ -2992,7 +2991,6 @@ var
|
||||
Special: Boolean;
|
||||
begin
|
||||
if APersistent=nil then exit;
|
||||
Include(FFlags, dfDuringDeletePers);
|
||||
try
|
||||
//debugln(['TDesigner.DoDeletePersistent A ',dbgsName(APersistent),' FreeIt=',FreeIt]);
|
||||
// unselect component
|
||||
@ -3034,7 +3032,6 @@ begin
|
||||
finally
|
||||
// unmark component
|
||||
DeletingPersistent.Remove(APersistent);
|
||||
Exclude(FFlags, dfDuringDeletePers);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3178,10 +3175,8 @@ begin
|
||||
{$IFDEF VerboseDesigner}
|
||||
DebugLn('[TDesigner.Notification] opRemove ',dbgsName(AComponent));
|
||||
{$ENDIF}
|
||||
// Notification is usually triggered by TheFormEditor.DeleteComponent
|
||||
// in DoDeletePersistent. Don't call it again.
|
||||
if not (dfDuringDeletePers in FFlags) then // Needed eg. for TControlSelection
|
||||
DoDeletePersistent(AComponent,false); // with copy/paste.
|
||||
// Notification is usually triggered by TheFormEditor.DeleteComponent in DoDeletePersistent.
|
||||
DoDeletePersistent(AComponent,false);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user