From 50cb77e413f41a57507c8e31d4ad1e5b6b1ec92e Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 6 Feb 2021 01:19:01 +0100 Subject: [PATCH] config:: fixed bool_setting::editable and reaction --- config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config.cpp b/config.cpp index 16e58888..48566e0f 100644 --- a/config.cpp +++ b/config.cpp @@ -164,7 +164,7 @@ struct bool_setting : public setting { bool dft; void add_as_saver(); reaction_t switcher; - void editable(string cap, char key ) { menu_item_name = cap; default_key = key; } + bool_setting* editable(string cap, char key ) { menu_item_name = cap; default_key = key; return this; } virtual bool affects(void *v) override { return v == value; } virtual void show_edit_option(char key) override; virtual cld get_cld() { return *value ? 1 : 0; } @@ -309,7 +309,7 @@ void float_setting::show_edit_option(char key) { add_to_changed(this); dialog::editNumber(*value, min_value, max_value, step, dft, XLAT(menu_item_name), help_text); if(sets) sets(); - if(reaction) reaction(); + if(reaction) dialog::reaction = reaction; }); } @@ -320,7 +320,7 @@ void int_setting::show_edit_option(char key) { add_to_changed(this); dialog::editNumber(*value, min_value, max_value, step, dft, XLAT(menu_item_name), help_text); if(sets) sets(); - if(reaction) reaction(); + if(reaction) dialog::reaction = reaction; }); }