(svn r10637) -Fix: Enable the Random Industries in scenario editor if setting Number of Industries is not NONE.
authorbelugas
Fri, 20 Jul 2007 16:08:28 +0000
changeset 7289 9d5fe9be6f2f
parent 7288 9059a49c2102
child 7290 bb6d72d5230a
(svn r10637) -Fix: Enable the Random Industries in scenario editor if setting Number of Industries is not NONE.
Spotted by skiddl13.
Thanks to glx for help in finding and better looking code :)
src/industry_gui.cpp
--- a/src/industry_gui.cpp	Fri Jul 20 14:49:41 2007 +0000
+++ b/src/industry_gui.cpp	Fri Jul 20 16:08:28 2007 +0000
@@ -153,9 +153,7 @@
 			 * In Editor, you just build, while ingame, or you fund or you prospect */
 			if (_game_mode == GM_EDITOR) {
 				/* We've chosen many random industries but no industries have been specified */
-				if (indsp == NULL && _patches.raw_industry_construction == 0) {
-					_fund_gui.enabled[WP(w, fnd_d).index] = false;
-				}
+				if (indsp == NULL) _fund_gui.enabled[WP(w, fnd_d).index] = _opt.diff.number_industries != 0;
 				w->widget[DYNA_INDU_FUND_WIDGET].data = STR_BUILD_NEW_INDUSTRY;
 			} else {
 				w->widget[DYNA_INDU_FUND_WIDGET].data = (_patches.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_PROSPECT_NEW_INDUSTRY : STR_FUND_NEW_INDUSTRY;