diff options
author | bjarni <bjarni@openttd.org> | 2006-09-30 23:53:35 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2006-09-30 23:53:35 +0000 |
commit | 8deaef7fafc9eab8a98b62c43a18e25b4ab152cc (patch) | |
tree | 8a339f6d254cbc4a83ed0adc324695812a732e1b | |
parent | 22845ef3b96abd33723c64ab8f8efbd521b41f28 (diff) | |
download | openttd-8deaef7fafc9eab8a98b62c43a18e25b4ab152cc.tar.xz |
(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)
-rw-r--r-- | depot_gui.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/depot_gui.c b/depot_gui.c index f2f2e205e..f5c6828ee 100644 --- a/depot_gui.c +++ b/depot_gui.c @@ -667,7 +667,10 @@ static void DepotWndProc(Window *w, WindowEvent *e) break; 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; case DEPOT_WIDGET_VEHICLE_LIST: |