designer: BuildPopupMenu must reassign DesignerMenuRoot and all events (fixes bug #0011278)

git-svn-id: trunk@18750 -
This commit is contained in:
paul 2009-02-18 15:36:14 +00:00
parent 69610334ef
commit ce5bc947cf

View File

@ -2755,8 +2755,8 @@ end;
procedure TDesigner.BuildPopupMenu; procedure TDesigner.BuildPopupMenu;
begin begin
if DesignerPopupMenu<>nil then exit; if DesignerPopupMenu = nil then
begin
DesignerPopupMenu:=TPopupMenu.Create(nil); DesignerPopupMenu:=TPopupMenu.Create(nil);
with DesignerPopupMenu do with DesignerPopupMenu do
begin begin
@ -2764,6 +2764,8 @@ begin
OnPopup := @DesignerPopupMenuPopup; OnPopup := @DesignerPopupMenuPopup;
Images := IDEImages.Images_16; Images := IDEImages.Images_16;
end; end;
end;
// assign the root TMenuItem to the registered menu root. // assign the root TMenuItem to the registered menu root.
// This will automatically create all registered items // This will automatically create all registered items