mirror of https://github.com/OpenTTD/OpenTTD
(svn r8094) -Feature/Fix (r7523): Show the activated status of the GRF list after pressing 'apply'
in the newgrf window, instead of the local list.release/0.6
parent
5ed33e549e
commit
57a366e6d8
|
@ -278,9 +278,19 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
|
||||||
{
|
{
|
||||||
if (confirmed) {
|
if (confirmed) {
|
||||||
newgrf_d *nd = &WP(w, newgrf_d);
|
newgrf_d *nd = &WP(w, newgrf_d);
|
||||||
|
GRFConfig *c;
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
CopyGRFConfigList(nd->orig_list, *nd->list);
|
CopyGRFConfigList(nd->orig_list, *nd->list);
|
||||||
ReloadNewGRFData();
|
ReloadNewGRFData();
|
||||||
|
|
||||||
|
/* Show new, updated list */
|
||||||
|
for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++);
|
||||||
|
CopyGRFConfigList(nd->list, *nd->orig_list);
|
||||||
|
for (c = *nd->list; c != NULL && i > 0; c = c->next, i--);
|
||||||
|
nd->sel = c;
|
||||||
|
|
||||||
|
SetWindowDirty(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue