Fix group add/remove/rename not updating template replacement GUI in MP
This commit is contained in:
@@ -342,6 +342,7 @@ CommandCost CmdCreateGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|||||||
|
|
||||||
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
|
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
|
||||||
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
|
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
|
||||||
|
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
@@ -401,6 +402,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
|
|||||||
|
|
||||||
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
|
InvalidateWindowData(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, _current_company).Pack());
|
||||||
InvalidateWindowData(WC_COMPANY_COLOUR, _current_company, vt);
|
InvalidateWindowData(WC_COMPANY_COLOUR, _current_company, vt);
|
||||||
|
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
@@ -471,6 +473,7 @@ CommandCost CmdAlterGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|||||||
InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1);
|
InvalidateWindowData(WC_REPLACE_VEHICLE, g->vehicle_type, 1);
|
||||||
InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack());
|
InvalidateWindowData(GetWindowClassForVehicleType(g->vehicle_type), VehicleListIdentifier(VL_GROUP_LIST, g->vehicle_type, _current_company).Pack());
|
||||||
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
|
InvalidateWindowData(WC_COMPANY_COLOUR, g->owner, g->vehicle_type);
|
||||||
|
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return CommandCost();
|
return CommandCost();
|
||||||
|
@@ -946,7 +946,6 @@ public:
|
|||||||
void OnQueryTextFinished(char *str) override
|
void OnQueryTextFinished(char *str) override
|
||||||
{
|
{
|
||||||
if (str != nullptr) DoCommandP(0, this->group_rename, 0, CMD_ALTER_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_RENAME), nullptr, str);
|
if (str != nullptr) DoCommandP(0, this->group_rename, 0, CMD_ALTER_GROUP | CMD_MSG(STR_ERROR_GROUP_CAN_T_RENAME), nullptr, str);
|
||||||
InvalidateWindowData(WC_TEMPLATEGUI_MAIN, 0, 0, 0);
|
|
||||||
this->group_rename = INVALID_GROUP;
|
this->group_rename = INVALID_GROUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user