(svn r1435) Fix: [ 1094092 ] Toolbars accessible via keyboard in spectator mode

This commit is contained in:
dominik
2005-01-08 20:55:21 +00:00
parent 4b6a846d9c
commit bfc670b4d9
5 changed files with 6 additions and 0 deletions

View File

@@ -803,6 +803,8 @@ void ShowBuildRailToolbar(int index, int button)
{
Window *w;
if (_current_player == OWNER_SPECTATOR) return;
// 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) {
DeleteWindowById(WC_BUILD_TOOLBAR, 0);