only clear description if element matches

This commit is contained in:
thecozies 2025-05-01 09:42:55 -05:00
parent 64e4d91e13
commit 02b9a7a422

View file

@ -139,14 +139,10 @@ void ConfigSubMenu::back_button_pressed() {
}
void ConfigSubMenu::set_description_option_element(ConfigOptionElement *option, bool active) {
if (description_option_element != nullptr && description_option_element != option) {
return;
}
if (active) {
description_option_element = option;
}
else {
else if (description_option_element == option) {
description_option_element = nullptr;
}