Mercurial > hg > openttd
changeset 6270:60de27078397 draft
(svn r9079) -Codechange: add WWT_LAST widget when dynamically building cargo payment graph
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Fri, 09 Mar 2007 22:55:04 +0000 |
parents | 3886caf226d3 |
children | 56a8bb763a87 |
files | src/graph_gui.cpp |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -799,8 +799,9 @@ ResizeWindow(w, 0, num_active * 8); /* Add widgets for each cargo type */ - w->widget_count = 3 + num_active; - w->widget = ReallocT(w->widget, w->widget_count); + w->widget_count += num_active; + w->widget = ReallocT(w->widget, w->widget_count + 1); + w->widget[w->widget_count].type = WWT_LAST; /* Set the properties of each widget */ for (uint i = 0; i != num_active; i++) {