(svn r7206) -Codechange: Remove (some of) the magic needed for windows that could be invalid after

a call to DeleteWindow() somewhere else. Also do some cleanup with AllowWindowDescFront()
This commit is contained in:
Darkvater
2006-11-18 17:04:44 +00:00
parent c01c294afb
commit 22ab60c9cb
8 changed files with 6 additions and 29 deletions

View File

@@ -189,11 +189,8 @@ static void DepotSellAllWndProc(Window *w, WindowEvent *e)
case WE_CLICK:
switch (e->we.click.widget) {
case 4:
/* Weird issue here. If We execute the DoCommandP first, then the window is not closed */
DeleteWindow(w);
DoCommandP(tile, vehicle_type, 0, NULL, CMD_DEPOT_SELL_ALL_VEHICLES);
break;
/* Fallthrough */
case 3:
DeleteWindow(w);
break;