educationlaz: hiding menu items only wehn enabled

git-svn-id: trunk@22242 -
This commit is contained in:
mattias 2009-10-20 13:20:24 +00:00
parent 5ea22214c6
commit 048a50846a

View File

@ -416,9 +416,16 @@ procedure TEduMenuOptions.Apply(Enable: boolean);
Section: TIDEMenuSection; Section: TIDEMenuSection;
i: Integer; i: Integer;
begin begin
if (not KeepItemVisible(Item)) and MenuHidden[MenuItemToPath(Item)] then if (not KeepItemVisible(Item)) then begin
Item.Visible:=false; if Enable then begin
// Note: do not show items. Some items should be hidden independent of education. if MenuHidden[MenuItemToPath(Item)] then
Item.Visible:=false;
// Note: do not show items. Some items should be hidden independent of education.
end else begin
if MenuHidden[MenuItemToPath(Item)] then
Item.Visible:=true;
end;
end;
if Item is TIDEMenuSection then begin if Item is TIDEMenuSection then begin
Section:=TIDEMenuSection(Item); Section:=TIDEMenuSection(Item);
for i:=0 to Section.Count-1 do for i:=0 to Section.Count-1 do