Codechange: Replace drop down list's default bools with DropDownOptions. (#14837)

Improves maintainability and avoids positional ambiguity.
This commit is contained in:
Peter Nelson
2025-11-29 16:17:44 +00:00
committed by GitHub
parent 2675295675
commit 069833963c
7 changed files with 49 additions and 43 deletions

View File

@@ -442,12 +442,12 @@ void PickerWindow::OnClick(Point pt, WidgetID widget, int)
case WID_PW_CONFIGURE_BADGES:
if (this->badge_classes.GetClasses().empty()) break;
ShowDropDownList(this, BuildBadgeClassConfigurationList(this->badge_classes, 1, {}), -1, widget, 0, false, true);
ShowDropDownList(this, BuildBadgeClassConfigurationList(this->badge_classes, 1, {}), -1, widget, 0, DropDownOption::Persist);
break;
default:
if (IsInsideMM(widget, this->badge_filters.first, this->badge_filters.second)) {
ShowDropDownList(this, this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0, false);
ShowDropDownList(this, this->GetWidget<NWidgetBadgeFilter>(widget)->GetDropDownList(), -1, widget, 0);
}
break;
}