|
|
@ -590,6 +590,7 @@ void ShowBuildRailToolbar(RailType railtype, int button)
|
|
|
|
Window *w;
|
|
|
|
Window *w;
|
|
|
|
|
|
|
|
|
|
|
|
if (_current_player == OWNER_SPECTATOR) return;
|
|
|
|
if (_current_player == OWNER_SPECTATOR) return;
|
|
|
|
|
|
|
|
if (!ValParamRailtype(railtype)) return;
|
|
|
|
|
|
|
|
|
|
|
|
// don't recreate the window if we're clicking on a button and the window exists.
|
|
|
|
// don't recreate the window if we're clicking on a button and the window exists.
|
|
|
|
if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) {
|
|
|
|
if (button < 0 || !(w = FindWindowById(WC_BUILD_TOOLBAR, 0)) || w->wndproc != BuildRailToolbWndProc) {
|
|
|
|