Removing a TMainMenu or a TPopupMenu from a form does not remove the associated TMenuItems from code
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
When you have a TMainMenu or TPopupMenu on a form and you delete it, the TMenuItems are (as expected) removed from lfm, but they are not removed in the forms definition in the source editor.
Steps to reproduce:
Place a TMainmenu on a TForm
Add a MenuItem:
In SE you see this:
TForm1 = class(TForm)
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
Now delete the TainMenu:
In SE you have
TForm1 = class(TForm)
MenuItem1: TMenuItem;
Any left reference to MenuItem1 will af course crash the program!
Normally (if MenuItem1 removed from SE, this should show up when compiling)
Additional information:
I don't remeber having seen this before, so it may well be a regresion.
Mantis conversion info:
- Mantis ID: 27689
- OS: Window
- OS Build: Win7
- Build: r48395
- Platform: i386
- Version: 1.5 (SVN)
- Fixed in revision: r48425 (#40d5c151)
- Target version: 1.4