IDE: Update Object Inspector after renaming a component (F2). Issue #34151, patch from errno.

git-svn-id: trunk@58749 -
This commit is contained in:
juha 2018-08-21 09:46:14 +00:00
parent 6989fa68c2
commit 712b1a0ddd

View File

@ -12987,8 +12987,10 @@ procedure TMainIDE.PropHookComponentRenamed(AComponent: TComponent);
begin
FormEditor1.UpdateComponentName(AComponent);
// Component can be renamed in designer and OI must be updated
if ObjectInspector1<>nil then
ObjectInspector1.Update;
if ObjectInspector1<>nil then begin
ObjectInspector1.RefreshComponentTreeSelection;
ObjectInspector1.RefreshPropertyValues;
end;
end;
procedure TMainIDE.PropHookModified(Sender: TObject; PropName: ShortString);
@ -13001,6 +13003,7 @@ begin
else
// Any change of property can cause a change in display name.
ObjectInspector1.UpdateComponentValues;
ObjectInspector1.RefreshPropertyValues;
end;
{-------------------------------------------------------------------------------