IDE: Rebuild the OI ComponentTree after an item is deleted. Issue #30635.

git-svn-id: trunk@53030 -
This commit is contained in:
juha 2016-09-25 11:33:38 +00:00
parent 402dc0472d
commit da5e3acce3
2 changed files with 7 additions and 3 deletions

View File

@ -732,6 +732,7 @@ procedure TComponentTreeView.UpdateComponentNodesValues;
end;
begin
DebugLn('TComponentTreeView.RebuildComponentNodes: Updating TreeView component node values');
BeginUpdate;
UpdateComponentNode(Items.GetFirstNode);
EndUpdate;

View File

@ -12677,9 +12677,12 @@ end;
procedure TMainIDE.OnPropHookModified(Sender: TObject; PropName: ShortString);
begin
// ToDo: Should designer be marked as modified with PropName?
if PropName='' then ;
if Assigned(ObjectInspector1) then
// Any change of property can cause a change of a display name
if ObjectInspector1=Nil then Exit;
if PropName='' then
// Item may be added or deleted or whatever.
ObjectInspector1.ComponentTree.RebuildComponentNodes
else
// Any change of property can cause a change in display name.
ObjectInspector1.ComponentTree.UpdateComponentNodesValues;
end;