(svn r12939) -Codechange: do not use the window proc to determine whether a toolbar is a rail toolbar, but use the window number.

This commit is contained in:
rubidium
2008-05-04 09:39:16 +00:00
parent a26b25aecc
commit 8ca1035316
5 changed files with 17 additions and 16 deletions

View File

@@ -682,8 +682,8 @@ void ShowBuildRoadToolbar(RoadType roadtype)
if (!IsValidPlayer(_current_player)) return;
_cur_roadtype = roadtype;
DeleteWindowById(WC_BUILD_TOOLBAR, 0);
Window *w = AllocateWindowDesc(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc);
DeleteWindowByClass(WC_BUILD_TOOLBAR);
Window *w = AllocateWindowDescFront(roadtype == ROADTYPE_ROAD ? &_build_road_desc : &_build_tramway_desc, TRANSPORT_ROAD);
if (_patches.link_terraform_toolbar) ShowTerraformToolbar(w);
}