(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income

-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
This commit is contained in:
smatz
2008-02-20 17:06:58 +00:00
parent e95a85315c
commit a190606f2e
8 changed files with 39 additions and 25 deletions

View File

@@ -483,8 +483,8 @@ static void GroupWndProc(Window *w, WindowEvent *e)
if (w->resize.step_height == PLY_WND_PRC__SIZE_OF_ROW_BIG2) DrawSmallOrderList(v, x + 138, y2);
SetDParam(0, v->profit_this_year >> 8);
SetDParam(1, v->profit_last_year >> 8);
SetDParam(0, v->GetDisplayProfitThisYear());
SetDParam(1, v->GetDisplayProfitLastYear());
DrawString(x + 19, y2 + w->resize.step_height - 8, STR_0198_PROFIT_THIS_YEAR_LAST_YEAR, TC_FROMSTRING);
if (IsValidGroupID(v->group_id)) {