mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r6595) -Fix r6542: [depot window] clicking sell all in a depot with no vehicles will now do nothing at all (instead of opening the confination window) (spotted by glx)
This commit is contained in:
parent
ba1388c33d
commit
aac871d04e
@ -667,7 +667,10 @@ static void DepotWndProc(Window *w, WindowEvent *e)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case DEPOT_WIDGET_SELL_ALL:
|
case DEPOT_WIDGET_SELL_ALL:
|
||||||
ShowDepotSellAllWindow(w->window_number, WP(w, depot_d).type);
|
/* Only open the confimation window if there are anything to sell */
|
||||||
|
if (WP(w, depot_d).engine_count != 0 || WP(w, depot_d).wagon_count != 0) {
|
||||||
|
ShowDepotSellAllWindow(w->window_number, WP(w, depot_d).type);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DEPOT_WIDGET_VEHICLE_LIST:
|
case DEPOT_WIDGET_VEHICLE_LIST:
|
||||||
|
Loading…
Reference in New Issue
Block a user