mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 18:35:55 +02:00
fix menuconfig 'deselect' statement
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6753 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
73a7251b02
commit
15aefc67e4
@ -197,6 +197,7 @@ static void sym_calc_visibility(struct symbol *sym)
|
|||||||
{
|
{
|
||||||
struct property *prop;
|
struct property *prop;
|
||||||
tristate tri;
|
tristate tri;
|
||||||
|
int deselected = 0;
|
||||||
|
|
||||||
/* any prompt visible? */
|
/* any prompt visible? */
|
||||||
tri = no;
|
tri = no;
|
||||||
@ -206,15 +207,15 @@ static void sym_calc_visibility(struct symbol *sym)
|
|||||||
}
|
}
|
||||||
if (tri == mod && (sym->type != S_TRISTATE))
|
if (tri == mod && (sym->type != S_TRISTATE))
|
||||||
tri = yes;
|
tri = yes;
|
||||||
if (sym->rev_dep_inv.expr) {
|
if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) {
|
||||||
if (expr_calc_value(sym->rev_dep_inv.expr) == yes)
|
tri = no;
|
||||||
tri = no;
|
deselected = 1;
|
||||||
}
|
}
|
||||||
if (sym->visible != tri) {
|
if (sym->visible != tri) {
|
||||||
sym->visible = tri;
|
sym->visible = tri;
|
||||||
sym_set_changed(sym);
|
sym_set_changed(sym);
|
||||||
}
|
}
|
||||||
if (sym_is_choice_value(sym))
|
if (sym_is_choice_value(sym) || deselected)
|
||||||
return;
|
return;
|
||||||
tri = no;
|
tri = no;
|
||||||
if (sym->rev_dep.expr)
|
if (sym->rev_dep.expr)
|
||||||
@ -310,6 +311,8 @@ void sym_calc_value(struct symbol *sym)
|
|||||||
if (sym_is_choice_value(sym) && sym->visible == yes) {
|
if (sym_is_choice_value(sym) && sym->visible == yes) {
|
||||||
prop = sym_get_choice_prop(sym);
|
prop = sym_get_choice_prop(sym);
|
||||||
newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
|
newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;
|
||||||
|
} else if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) {
|
||||||
|
newval.tri = no;
|
||||||
} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
|
} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {
|
||||||
sym->flags |= SYMBOL_WRITE;
|
sym->flags |= SYMBOL_WRITE;
|
||||||
if (sym_has_value(sym))
|
if (sym_has_value(sym))
|
||||||
|
Loading…
Reference in New Issue
Block a user