1
0
Fork 0

Fix #7281: Unable to select last group in open livery window on group creation.

pull/7284/head
peter1138 2019-02-26 06:45:14 +00:00 committed by Niels Martin Hansen
parent c2e4a8c9bf
commit 7ac17f5ae4
1 changed files with 7 additions and 1 deletions

View File

@ -1025,9 +1025,15 @@ public:
if (data != -1) { if (data != -1) {
/* data contains a VehicleType, rebuild list if it displayed */ /* data contains a VehicleType, rebuild list if it displayed */
if (this->livery_class == data + LC_GROUP_RAIL) { if (this->livery_class == data + LC_GROUP_RAIL) {
if (!Group::IsValidID(this->sel)) this->sel = INVALID_GROUP;
this->groups.ForceRebuild(); this->groups.ForceRebuild();
this->BuildGroupList((CompanyID)this->window_number); this->BuildGroupList((CompanyID)this->window_number);
this->SetRows();
if (!Group::IsValidID(this->sel)) {
this->sel = INVALID_GROUP;
if (this->groups.Length() > 0) this->sel = this->groups[0]->index;
}
this->SetDirty(); this->SetDirty();
} }
return; return;