Fix #6133: Construction rights not shown after selecting buy mode

tool_set() cancels the previous tool, so it has to be called first or it will cancel the _landRightsMode that was meant to be activated.
This commit is contained in:
Tomas Dittmann 2017-08-16 10:22:27 +02:00 committed by Michael Steenbeek
parent 4da15a6785
commit d266ab5f91
1 changed files with 2 additions and 2 deletions

View File

@ -163,20 +163,20 @@ static void window_land_rights_mouseup(rct_window *w, rct_widgetindex widgetInde
case WIDX_BUY_LAND_RIGHTS:
if (_landRightsMode != LAND_RIGHTS_MODE_BUY_LAND)
{
tool_set(w, WIDX_BUY_LAND_RIGHTS, TOOL_UP_ARROW);
_landRightsMode = LAND_RIGHTS_MODE_BUY_LAND;
hide_construction_rights();
show_land_rights();
tool_set(w, WIDX_BUY_LAND_RIGHTS, TOOL_UP_ARROW);
window_invalidate(w);
}
break;
case WIDX_BUY_CONSTRUCTION_RIGHTS:
if (_landRightsMode != LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS)
{
tool_set(w, WIDX_BUY_CONSTRUCTION_RIGHTS, TOOL_UP_ARROW);
_landRightsMode = LAND_RIGHTS_MODE_BUY_CONSTRUCTION_RIGHTS;
hide_land_rights();
show_construction_rights();
tool_set(w, WIDX_BUY_CONSTRUCTION_RIGHTS, TOOL_UP_ARROW);
window_invalidate(w);
}
break;