Before opening linked to main toolbar windows, delete linked windows.

This commit is contained in:
Juanjo
2013-10-19 19:23:15 +00:00
committed by pelya
parent 0de2e2a664
commit 141bb0861e
9 changed files with 10 additions and 4866 deletions

View File

@@ -376,7 +376,7 @@ Window *ShowBuildDocksToolbar()
{
if (!Company::IsValidID(_local_company)) return NULL;
DeleteWindowByClass(WC_BUILD_TOOLBAR);
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
}
@@ -415,6 +415,7 @@ static WindowDesc _build_docks_scen_toolbar_desc(
*/
Window *ShowBuildDocksScenToolbar()
{
DeleteToolbarLinkedWindows();
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_scen_toolbar_desc, TRANSPORT_WATER);
}