From 16dfc7a04d07e2e31549cc59363562e0e88cefcc Mon Sep 17 00:00:00 2001 From: alberth Date: Fri, 6 Aug 2010 12:23:44 +0000 Subject: (svn r20387) -Fix [FS#4000]: Allow the industry-chain button for non-fundable industries, and disallow for the 'many random industries'. --- src/industry_gui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 6afe6d8e7..3e8d06515 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -259,7 +259,8 @@ class BuildIndustryWindow : public Window { /** Update status of the fund and display-chain widgets. */ void SetButtons() { - this->SetWidgetsDisabledState(!this->enabled[this->selected_index], DPIW_DISPLAY_WIDGET, DPIW_FUND_WIDGET, WIDGET_LIST_END); + this->SetWidgetDisabledState(DPIW_FUND_WIDGET, this->selected_type != INVALID_INDUSTRYTYPE && !this->enabled[this->selected_index]); + this->SetWidgetDisabledState(DPIW_DISPLAY_WIDGET, this->selected_type == INVALID_INDUSTRYTYPE && this->enabled[this->selected_index]); } public: -- cgit v1.2.3-54-g00ecf