Fix 23960d0f2c
: Company livery window shows incorrect groups when opened from group window in multiplayer.
This commit is contained in:
@@ -707,7 +707,7 @@ public:
|
|||||||
this->BuildGroupList(company);
|
this->BuildGroupList(company);
|
||||||
this->SetRows();
|
this->SetRows();
|
||||||
} else {
|
} else {
|
||||||
this->SetSelectedGroup(group);
|
this->SetSelectedGroup(company, group);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->FinishInitNested(company);
|
this->FinishInitNested(company);
|
||||||
@@ -715,7 +715,7 @@ public:
|
|||||||
this->InvalidateData(1);
|
this->InvalidateData(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSelectedGroup(GroupID group)
|
void SetSelectedGroup(CompanyID company, GroupID group)
|
||||||
{
|
{
|
||||||
this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
|
this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
|
||||||
const Group *g = Group::Get(group);
|
const Group *g = Group::Get(group);
|
||||||
@@ -730,7 +730,7 @@ public:
|
|||||||
this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
|
this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
|
||||||
|
|
||||||
this->groups.ForceRebuild();
|
this->groups.ForceRebuild();
|
||||||
this->BuildGroupList((CompanyID)this->window_number);
|
this->BuildGroupList(company);
|
||||||
this->SetRows();
|
this->SetRows();
|
||||||
|
|
||||||
/* Position scrollbar to selected group */
|
/* Position scrollbar to selected group */
|
||||||
@@ -1105,7 +1105,7 @@ void ShowCompanyLiveryWindow(CompanyID company, GroupID group)
|
|||||||
if (w == NULL) {
|
if (w == NULL) {
|
||||||
new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group);
|
new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group);
|
||||||
} else if (group != INVALID_GROUP) {
|
} else if (group != INVALID_GROUP) {
|
||||||
w->SetSelectedGroup(group);
|
w->SetSelectedGroup(company, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user