Removing a Component with owned items keeps field declarations in source
Original Reporter info from Mantis: Martok @martok
-
Reporter name:
Original Reporter info from Mantis: Martok @martok
- Reporter name:
Description:
When a Menu is deleted from a form, the TMenuItem field declarations for its items are not removed.
The same happens when a DataSet with some field definitions is removed, the TField declarations remain.
Same for TActionList and its TActions.
I suspect this is true for all components that own child TComponents.
Steps to reproduce:
Test with the fewest steps:
- Add a TPopupMenu component (adds
PopupMenu1: TPopupMenu;
) - Add a MenuItem (adds
MenuItem1: TMenuItem;
) - Delete the PopupMenu from the form editor (removes &LtPos;pre>PopupMenu1: TPopupMenu;&LtPos;/pre>, but not &LtPos;pre>MenuItem1: TMenuItem; &LtPos;/pre>)
Mantis conversion info:
- Mantis ID: 38731
- Version: 2.1 (SVN)
- Fixed in revision: r64985 (#1b7c39ba)
- Monitored by: » AntonK (Anton Kavalenka)