FS#6204 - Toolbars not invalidated after changing "max vehicles" settings.

Attached to Project: OpenTTD
Opened by Grzegorz DuczyƄski (adf88) - Sunday, 11 January 2015, 11:41 GMT
Last edited by frosch (frosch) - Sunday, 22 February 2015, 15:26 GMT
Type Bug
Category Interface
Status Closed
Assigned To No-one
Operating System All
Severity Very Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


In the settings, we can set maximum allowed number of vehicles of certain type (vehicles.max_trains etc.). Value 0 means to disables certain type of vehicles - some buttons on some toolbars are disabled in this case. However, while changing this settings in-game, no appropriate callback is called to update toolbars. The only thing which gets updated is the main toolbar (through OnPain event). But other toolbars and construction windows stay opened/invalid.

I'm attaching a fix-patch. New callback signals WC_BUILD_TOOLBAR windows to update themselves.
This task depends upon

Closed by  frosch (frosch)
Sunday, 22 February 2015, 15:26 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r27163. Thanks for the fix!