Fix #14756: Invalidate nested focus before widget container is cleared. (#14809)

This commit is contained in:
Cyprian Klimaszewski
2025-12-06 18:52:44 +01:00
committed by dP
parent 8978e029cf
commit a8f0d5a3ad
6 changed files with 38 additions and 11 deletions

View File

@@ -1348,8 +1348,7 @@ struct BuildVehicleWindow : Window {
// CM calls this in constructor
// this->SetCargoFilterArray();
auto container = this->GetWidget<NWidgetContainer>(WID_BV_BADGE_FILTER);
this->badge_filters = AddBadgeDropdownFilters(*container, WID_BV_BADGE_FILTER, COLOUR_GREY, static_cast<GrfSpecFeature>(GSF_TRAINS + this->vehicle_type));
this->badge_filters = AddBadgeDropdownFilters(this, WID_BV_BADGE_FILTER, WID_BV_BADGE_FILTER, COLOUR_GREY, static_cast<GrfSpecFeature>(GSF_TRAINS + this->vehicle_type));
this->widget_lookup.clear();
this->nested_root->FillWidgetLookup(this->widget_lookup);