IDE/TabOrder: Update the list when a component is renamed

This commit is contained in:
n7800 2025-01-19 13:03:25 +05:00 committed by Juha Manninen
parent e62036a5be
commit 5671244fe7

View File

@ -73,6 +73,7 @@ type
procedure PersistentDeleting({%H-}APersistent: TPersistent); procedure PersistentDeleting({%H-}APersistent: TPersistent);
procedure DeletePersistent(var {%H-}APersistent: TPersistent); procedure DeletePersistent(var {%H-}APersistent: TPersistent);
procedure SetSelection(const ASelection: TPersistentSelectionList); procedure SetSelection(const ASelection: TPersistentSelectionList);
procedure ComponentRenamed({%H-}AComponent: TComponent);
end; end;
{ TTabOrderPropEditor } { TTabOrderPropEditor }
@ -140,6 +141,7 @@ begin
GlobalDesignHook.AddHandlerPersistentDeleting(@PersistentDeleting); GlobalDesignHook.AddHandlerPersistentDeleting(@PersistentDeleting);
GlobalDesignHook.AddHandlerDeletePersistent(@DeletePersistent); GlobalDesignHook.AddHandlerDeletePersistent(@DeletePersistent);
GlobalDesignHook.AddHandlerSetSelection(@SetSelection); GlobalDesignHook.AddHandlerSetSelection(@SetSelection);
GlobalDesignHook.AddHandlerComponentRenamed(@ComponentRenamed);
IDEImages.AssignImage(ArrowDown, 'arrow_down'); IDEImages.AssignImage(ArrowDown, 'arrow_down');
IDEImages.AssignImage(ArrowUp, 'arrow_up'); IDEImages.AssignImage(ArrowUp, 'arrow_up');
@ -422,6 +424,11 @@ begin
FUpdating := false; FUpdating := false;
end; end;
procedure TTabOrderDialog.ComponentRenamed(AComponent: TComponent);
begin
SomethingChanged;
end;
procedure TTabOrderDialog.PersistentAdded(APersistent: TPersistent; Select: boolean); procedure TTabOrderDialog.PersistentAdded(APersistent: TPersistent; Select: boolean);
begin begin
SomethingChanged; SomethingChanged;