summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-08-06 12:23:44 +0000
committeralberth <alberth@openttd.org>2010-08-06 12:23:44 +0000
commit16dfc7a04d07e2e31549cc59363562e0e88cefcc (patch)
tree79521c66f3169014c64d6571b33c55970da92fa7 /src
parentd9c9ae8fcf0dd5ebbcb18b8eb650e49c0e405da7 (diff)
downloadopenttd-16dfc7a04d07e2e31549cc59363562e0e88cefcc.tar.xz
(svn r20387) -Fix [FS#4000]: Allow the industry-chain button for non-fundable industries, and disallow for the 'many random industries'.
Diffstat (limited to 'src')
-rw-r--r--src/industry_gui.cpp3
1 files changed, 2 insertions, 1 deletions
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: