Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 10, 2024
1 parent b362cbf commit 6e4cbf5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitpicker.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"user": "torvalds",
"repo": "linux",
"branch": "11066801dd4b7c4d75fce65c812723a80c1481ae",
"branch": "de2f378f2b771b39594c04695feee86476743a69",
"data": [
{
"root": "scripts/kconfig",
Expand Down
13 changes: 12 additions & 1 deletion menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ bool menu_is_empty(struct menu *menu)

bool menu_is_visible(struct menu *menu)
{
struct menu *child;
struct symbol *sym;
tristate visible;

Expand All @@ -551,7 +552,17 @@ bool menu_is_visible(struct menu *menu)
} else
visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr);

return visible != no;
if (visible != no)
return true;

if (!sym || sym_get_tristate_value(menu->sym) == no)
return false;

for (child = menu->list; child; child = child->next)
if (menu_is_visible(child))
return true;

return false;
}

const char *menu_get_prompt(const struct menu *menu)
Expand Down

0 comments on commit 6e4cbf5

Please sign in to comment.