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) Result := PropertyHook.GetComponentName(Component)
else else
Result := Component.Name; Result := Component.Name;
end else end;
Result := inherited GetValue;
end; end;
{ TComponentNamePropertyEditor } { TComponentNamePropertyEditor }

View File

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