|
@@ -232,13 +232,15 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
|
|
struct property *prop;
|
|
struct property *prop;
|
|
struct expr *e;
|
|
struct expr *e;
|
|
|
|
|
|
|
|
+ /* first calculate all choice values' visibilities */
|
|
|
|
+ prop = sym_get_choice_prop(sym);
|
|
|
|
+ expr_list_for_each_sym(prop->expr, e, def_sym)
|
|
|
|
+ sym_calc_visibility(def_sym);
|
|
|
|
+
|
|
/* is the user choice visible? */
|
|
/* is the user choice visible? */
|
|
def_sym = sym->def[S_DEF_USER].val;
|
|
def_sym = sym->def[S_DEF_USER].val;
|
|
- if (def_sym) {
|
|
|
|
- sym_calc_visibility(def_sym);
|
|
|
|
- if (def_sym->visible != no)
|
|
|
|
- return def_sym;
|
|
|
|
- }
|
|
|
|
|
|
+ if (def_sym && def_sym->visible != no)
|
|
|
|
+ return def_sym;
|
|
|
|
|
|
/* any of the defaults visible? */
|
|
/* any of the defaults visible? */
|
|
for_all_defaults(sym, prop) {
|
|
for_all_defaults(sym, prop) {
|
|
@@ -246,18 +248,15 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
|
|
if (prop->visible.tri == no)
|
|
if (prop->visible.tri == no)
|
|
continue;
|
|
continue;
|
|
def_sym = prop_get_symbol(prop);
|
|
def_sym = prop_get_symbol(prop);
|
|
- sym_calc_visibility(def_sym);
|
|
|
|
if (def_sym->visible != no)
|
|
if (def_sym->visible != no)
|
|
return def_sym;
|
|
return def_sym;
|
|
}
|
|
}
|
|
|
|
|
|
/* just get the first visible value */
|
|
/* just get the first visible value */
|
|
prop = sym_get_choice_prop(sym);
|
|
prop = sym_get_choice_prop(sym);
|
|
- expr_list_for_each_sym(prop->expr, e, def_sym) {
|
|
|
|
- sym_calc_visibility(def_sym);
|
|
|
|
|
|
+ expr_list_for_each_sym(prop->expr, e, def_sym)
|
|
if (def_sym->visible != no)
|
|
if (def_sym->visible != no)
|
|
return def_sym;
|
|
return def_sym;
|
|
- }
|
|
|
|
|
|
|
|
/* no choice? reset tristate value */
|
|
/* no choice? reset tristate value */
|
|
sym->curr.tri = no;
|
|
sym->curr.tri = no;
|
|
@@ -383,12 +382,13 @@ void sym_calc_value(struct symbol *sym)
|
|
|
|
|
|
if (sym_is_choice(sym)) {
|
|
if (sym_is_choice(sym)) {
|
|
struct symbol *choice_sym;
|
|
struct symbol *choice_sym;
|
|
- int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
|
|
|
|
|
|
|
|
prop = sym_get_choice_prop(sym);
|
|
prop = sym_get_choice_prop(sym);
|
|
expr_list_for_each_sym(prop->expr, e, choice_sym) {
|
|
expr_list_for_each_sym(prop->expr, e, choice_sym) {
|
|
- choice_sym->flags |= flags;
|
|
|
|
- if (flags & SYMBOL_CHANGED)
|
|
|
|
|
|
+ if ((sym->flags & SYMBOL_WRITE) &&
|
|
|
|
+ choice_sym->visible != no)
|
|
|
|
+ choice_sym->flags |= SYMBOL_WRITE;
|
|
|
|
+ if (sym->flags & SYMBOL_CHANGED)
|
|
sym_set_changed(choice_sym);
|
|
sym_set_changed(choice_sym);
|
|
}
|
|
}
|
|
}
|
|
}
|