pre-reactions now work in list parameters

This commit is contained in:
Zeno Rogue
2026-08-05 13:44:10 +02:00
parent fa75a812de
commit 904dd92b98
+1 -1
View File
@@ -4473,7 +4473,7 @@ void list_parameter::show_edit_option(key_type key) {
if(need_list >= 2) dialog::start_list(1500, 1500, 'a');
for(int i=0; i<q; i++) {
dialog::addBoolItem(XLAT(options[i].first), get_value() == i, need_list >= 2 ? dialog::list_fake_key++ : 'a' + i);
auto action = [this, i, need_list] { set_value(i); if(need_list == 0) popScreen(); if(manual_reaction) manual_reaction(); if(reaction) reaction(); };
auto action = [this, i, need_list] { if(pre_reaction) pre_reaction(); set_value(i); if(need_list == 0) popScreen(); if(manual_reaction) manual_reaction(); if(reaction) reaction(); };
if(needs_confirm)
dialog::add_action_confirmed(action);
else