summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2007-01-13 14:01:05 +0000
committerDarkvater <Darkvater@openttd.org>2007-01-13 14:01:05 +0000
commit6f51ba941827ad2457a83a2242a4ff67ce00aadb (patch)
treeda387a1b6dcce28af19ee64f360f4b533cc02641 /src/newgrf_gui.cpp
parent95024bb21c21c38fde3453c34e7029b6cf3626ea (diff)
downloadopenttd-6f51ba941827ad2457a83a2242a4ff67ce00aadb.tar.xz
(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.
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 6884f043f..c02ffb701 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -278,9 +278,19 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
{
if (confirmed) {
newgrf_d *nd = &WP(w, newgrf_d);
+ GRFConfig *c;
+ int i = 0;
CopyGRFConfigList(nd->orig_list, *nd->list);
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);
}
}