File diff r27978:bcbbe240aea5 → r27979:37253e20ef1d
src/newgrf_gui.cpp
Show inline comments
 
@@ -720,13 +720,17 @@ struct NewGRFWindow : public Window, New
 
			if (iter == grfid_map.end() || iter->second->version >= a->version) continue;
 

	
 
			GRFConfig **c = &this->actives;
 
			while (*c != iter->second) c = &(*c)->next;
 
			GRFConfig *d = new GRFConfig(*a);
 
			d->next = (*c)->next;
 
			d->CopyParams(**c);
 
			if (d->IsCompatible((*c)->version)) {
 
				d->CopyParams(**c);
 
			} else {
 
				d->SetParameterDefaults();
 
			}
 
			if (this->active_sel == *c) {
 
				CloseWindowByClass(WC_GRF_PARAMETERS);
 
				CloseWindowByClass(WC_TEXTFILE);
 
				this->active_sel = nullptr;
 
			}
 
			delete *c;