diff -r b5c2449616b5 -r 66dde6412125 src/newgrf_gui.cpp --- a/src/newgrf_gui.cpp Sun Jun 17 21:31:00 2007 +0000 +++ b/src/newgrf_gui.cpp Tue Jun 26 23:40:58 2007 +0000 @@ -156,6 +156,11 @@ break; } + case WE_DOUBLE_CLICK: + if (e->we.click.widget != 3) break; + e->we.click.widget = 6; + /* Fall through */ + case WE_CLICK: switch (e->we.click.widget) { case 3: { @@ -186,7 +191,6 @@ GRFConfig *c = CallocT(1); *c = *src; c->filename = strdup(src->filename); - if (src->full_path != NULL) c->full_path = strdup(src->full_path); if (src->name != NULL) c->name = strdup(src->name); if (src->info != NULL) c->info = strdup(src->info); c->next = NULL; @@ -307,12 +311,12 @@ GRFConfig *c; int i = 0; - CopyGRFConfigList(nd->orig_list, *nd->list); + CopyGRFConfigList(nd->orig_list, *nd->list, false); ReloadNewGRFData(); /* Show new, updated list */ for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++); - CopyGRFConfigList(nd->list, *nd->orig_list); + CopyGRFConfigList(nd->list, *nd->orig_list, false); for (c = *nd->list; c != NULL && i > 0; c = c->next, i--); nd->sel = c; @@ -469,7 +473,9 @@ NewGRFConfirmationCallback ); } else { - CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list); + CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list, true); + ResetGRFConfig(false); + ReloadNewGRFData(); } break; @@ -498,7 +504,9 @@ case WE_DESTROY: if (!WP(w, newgrf_d).execute) { - CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list); + CopyGRFConfigList(WP(w, newgrf_d).orig_list, *WP(w, newgrf_d).list, true); + ResetGRFConfig(false); + ReloadNewGRFData(); } /* Remove the temporary copy of grf-list used in window */ ClearGRFConfigList(WP(w, newgrf_d).list); @@ -565,7 +573,7 @@ if (w == NULL) return; w->resize.step_height = 14; - CopyGRFConfigList(&local, *config); + CopyGRFConfigList(&local, *config, false); /* Clear selections */ WP(w, newgrf_d).sel = NULL;