It is useful to display the selected choice's value in the Value column.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -127,6 +127,9 @@ void ConfigItem::updateMenu(void) · 126 unmodified lines | ||
| 127 | 127 | goto set_prompt; |
| 128 | 128 | case M_CHOICE: |
| 129 | 129 | setIcon(promptColIdx, QIcon()); |
| 130 | + sym = sym_calc_choice(menu); | |
| 131 | + if (sym) | |
| 132 | + setText(dataColIdx, sym->name); | |
| 130 | 133 | goto set_prompt; |
| 131 | 134 | default: |
| 132 | 135 | ; |
| @@ -189,7 +192,11 @@ void ConfigItem::testUpdateMenu(void) · 56 unmodified lines | ||
| 189 | 192 | if (!menu) |
| 190 | 193 | return; |
| 191 | 194 | |
| 192 | − sym_calc_value(menu->sym); | |
| 195 | + if (menu->type == M_CHOICE) | |
| 196 | + sym_calc_choice(menu); | |
| 197 | + else | |
| 198 | + sym_calc_value(menu->sym); | |
| 199 | + | |
| 193 | 200 | if (menu->flags & MENU_CHANGED) { |
| 194 | 201 | /* the menu entry changed, so update all list items */ |
| 195 | 202 | menu->flags &= ~MENU_CHANGED; |