mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r25481) -Fix [FS#5620]: when the font size and colour change directly after eachother in a string, the latter isn't taken into account
This commit is contained in:
parent
0150ab1bb2
commit
bd2f4b9a24
|
@ -420,8 +420,10 @@ Layouter::Layouter(const char *str, int maxw, TextColour colour, FontSize fontsi
|
||||||
|
|
||||||
if (!this->fonts.Contains(buff - this->buffer)) {
|
if (!this->fonts.Contains(buff - this->buffer)) {
|
||||||
this->fonts.Insert(buff - this->buffer, f);
|
this->fonts.Insert(buff - this->buffer, f);
|
||||||
f = new Font(fontsize, cur_colour);
|
} else {
|
||||||
|
delete f;
|
||||||
}
|
}
|
||||||
|
f = new Font(fontsize, cur_colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Better safe than sorry. */
|
/* Better safe than sorry. */
|
||||||
|
|
Loading…
Reference in New Issue