Changeset - r13241:b3a648c2a5c9
[Not reviewed]
master
0 1 0
alberth - 15 years ago 2009-10-11 08:23:30
alberth@openttd.org
(svn r17760) -Revert (r17648): _local_company is less constant than you'd expect.
1 file changed with 13 insertions and 12 deletions:
0 comments (0 inline, 0 general)
src/depot_gui.cpp
Show inline comments
 
@@ -234,18 +234,6 @@ struct DepotWindow : Window {
 
		this->window_number = tile;
 
		this->SetupWidgetData(type);
 

	
 
		/* Setup disabled buttons. */
 
		this->SetWidgetsDisabledState(!IsTileOwner(tile, _local_company),
 
			DEPOT_WIDGET_STOP_ALL,
 
			DEPOT_WIDGET_START_ALL,
 
			DEPOT_WIDGET_SELL,
 
			DEPOT_WIDGET_SELL_CHAIN,
 
			DEPOT_WIDGET_SELL_ALL,
 
			DEPOT_WIDGET_BUILD,
 
			DEPOT_WIDGET_CLONE,
 
			DEPOT_WIDGET_AUTOREPLACE,
 
			WIDGET_LIST_END);
 

	
 
		this->FinishInitNested(desc, tile);
 
		this->owner = GetTileOwner(tile);
 
		this->CreateDepotListWindow(type);
 
@@ -672,6 +660,19 @@ struct DepotWindow : Window {
 
			this->vscroll.SetCount((this->vehicle_list.Length() + this->hscroll.GetCapacity() - 1) / this->hscroll.GetCapacity());
 
		}
 

	
 
		/* Setup disabled buttons. */
 
		TileIndex tile = this->window_number;
 
		this->SetWidgetsDisabledState(!IsTileOwner(tile, _local_company),
 
			DEPOT_WIDGET_STOP_ALL,
 
			DEPOT_WIDGET_START_ALL,
 
			DEPOT_WIDGET_SELL,
 
			DEPOT_WIDGET_SELL_CHAIN,
 
			DEPOT_WIDGET_SELL_ALL,
 
			DEPOT_WIDGET_BUILD,
 
			DEPOT_WIDGET_CLONE,
 
			DEPOT_WIDGET_AUTOREPLACE,
 
			WIDGET_LIST_END);
 

	
 
		this->DrawWidgets();
 
	}
 

	
0 comments (0 inline, 0 general)