X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c65afdb458fcb63936fd3db8a2b83ea89a9ef10..66202a7ee6d36fcca5b8d7159eca7ceb743f2f77:/demos/bombs/bombs1.cpp diff --git a/demos/bombs/bombs1.cpp b/demos/bombs/bombs1.cpp index cb1a9cc995..9853fa7fff 100644 --- a/demos/bombs/bombs1.cpp +++ b/demos/bombs/bombs1.cpp @@ -340,6 +340,10 @@ void BombsCanvas::OnChar(wxKeyEvent& event) if ((prevGridFocusX != m_game->m_gridFocusX) || (prevGridFocusY != m_game->m_gridFocusY)) { + // cause focused field to be visible after first key hit after launching new game + if( m_game->m_gridFocusX < 0 ) m_game->m_gridFocusX = 0; + if( m_game->m_gridFocusY < 0 ) m_game->m_gridFocusY = 0; + // refresh previous field and focused field RefreshField(prevGridFocusX, prevGridFocusY, prevGridFocusX, prevGridFocusY);