summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2013-09-22 13:06:09 +0000
committerplanetmaker <planetmaker@openttd.org>2013-09-22 13:06:09 +0000
commit21e85c9291b55102c80e001c75a382d842a49802 (patch)
tree7ae3435bf210b73cc498f474a5eafeebc7a169c3 /src
parent266d9262a2b10fd45e6dc4ff02b20bd717b75665 (diff)
downloadopenttd-21e85c9291b55102c80e001c75a382d842a49802.tar.xz
(svn r25794) -Change: No point to toggle a NewGRF's palette if its author declared one.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_gui.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index bf82783e0..3250ead8d 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -1201,7 +1201,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
this->SetWidgetDisabledState(WID_NS_SET_PARAMETERS, !this->show_params || this->active_sel == NULL || this->active_sel->num_valid_params == 0);
this->SetWidgetDisabledState(WID_NS_VIEW_PARAMETERS, !this->show_params || this->active_sel == NULL || this->active_sel->num_valid_params == 0);
- this->SetWidgetDisabledState(WID_NS_TOGGLE_PALETTE, disable_all);
+ this->SetWidgetDisabledState(WID_NS_TOGGLE_PALETTE, disable_all ||
+ (!(_settings_client.gui.newgrf_developer_tools || _settings_client.gui.scenario_developer) && ((c->palette & GRFP_GRF_MASK) != GRFP_GRF_UNSET)));
if (!disable_all) {
/* All widgets are now enabled, so disable widgets we can't use */