Merge branch 'master' into jgrpp

# Conflicts:
#	Makefile.src.in
#	findversion.sh
#	projects/determineversion.vbs
#	src/aircraft_cmd.cpp
#	src/lang/dutch.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/order_cmd.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.cpp
#	src/town_cmd.cpp
#	src/viewport.cpp
#	src/water_map.h
This commit is contained in:
Jonathan G Rennison
2019-03-04 00:51:24 +00:00
178 changed files with 1894 additions and 866 deletions

View File

@@ -711,7 +711,7 @@ public:
this->BuildGroupList(company);
this->SetRows();
} else {
this->SetSelectedGroup(group);
this->SetSelectedGroup(company, group);
}
this->FinishInitNested(company);
@@ -719,7 +719,7 @@ public:
this->InvalidateData(1);
}
void SetSelectedGroup(GroupID group)
void SetSelectedGroup(CompanyID company, GroupID group)
{
this->RaiseWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
const Group *g = Group::Get(group);
@@ -734,7 +734,7 @@ public:
this->LowerWidget(this->livery_class + WID_SCL_CLASS_GENERAL);
this->groups.ForceRebuild();
this->BuildGroupList((CompanyID)this->window_number);
this->BuildGroupList(company);
this->SetRows();
/* Position scrollbar to selected group */
@@ -1029,9 +1029,15 @@ public:
if (data != -1) {
/* data contains a VehicleType, rebuild list if it displayed */
if (this->livery_class == data + LC_GROUP_RAIL) {
if (!Group::IsValidID(this->sel)) this->sel = INVALID_GROUP;
this->groups.ForceRebuild();
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();
}
return;
@@ -1103,7 +1109,7 @@ void ShowCompanyLiveryWindow(CompanyID company, GroupID group)
if (w == NULL) {
new SelectCompanyLiveryWindow(&_select_company_livery_desc, company, group);
} else if (group != INVALID_GROUP) {
w->SetSelectedGroup(group);
w->SetSelectedGroup(company, group);
}
}