Merged revision(s) 56880 #da1abe9943, 56886 #fc690b742f from trunk:

IDE: Delete CollectionItems correctly, update also OI. Issue #32820.
........
IDE: Fixed IDE crash after putting a activex control on form. Issue #32375
........

git-svn-id: branches/fixes_1_8@56935 -
This commit is contained in:
maxim 2018-01-03 14:02:40 +00:00
parent 1ca943c156
commit 7c6e967ce8
2 changed files with 4 additions and 12 deletions

View File

@ -5194,8 +5194,7 @@ begin
Result := PropertyHook.GetComponentName(Component)
else
Result := Component.Name;
end else
Result := inherited GetValue;
end;
end;
{ TComponentNamePropertyEditor }

View File

@ -13018,18 +13018,11 @@ end;
procedure TMainIDE.PropHookDeletePersistent(var APersistent: TPersistent);
var
ADesigner: TDesigner;
AComponent: TComponent;
begin
if APersistent=nil then exit;
DebugLn('Hint: (lazarus) TMainIDE.OnPropHookDeletePersistent A ',dbgsName(APersistent));
if APersistent is TComponent then begin
AComponent:=TComponent(APersistent);
ADesigner:=TDesigner(FindRootDesigner(AComponent));
if ADesigner=nil then exit;
ADesigner.RemovePersistentAndChilds(AComponent);
end else begin
APersistent.Free;
end;
ADesigner:=TDesigner(FindRootDesigner(APersistent));
if ADesigner=nil then exit;
ADesigner.RemovePersistentAndChilds(APersistent);
APersistent:=nil;
end;