Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix more issues with navigating through grids with annotation squares. #152

Merged
merged 1 commit into from
Jun 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/XGridCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1550,7 +1550,7 @@ XGridCtrl::OnLetter(wxChar key, int mod)

// Space bar always moves forward one square
if (static_cast<int>(key) == WXK_SPACE)
SetFocusedSquare(m_focusedWord->FindNextSquare(m_focusedSquare), m_focusedWord);
SetFocusedSquare(m_focusedWord->FindNextSquare(m_focusedSquare, FIND_WHITE_SQUARE), m_focusedWord);
else
MoveAfterLetter();
}
Expand Down Expand Up @@ -1578,7 +1578,7 @@ XGridCtrl::MoveAfterLetter()
// word. Move to the next letter if it exists
if (newSquare == NULL)
{
newSquare = m_focusedWord->FindNextSquare(m_focusedSquare);
newSquare = m_focusedWord->FindNextSquare(m_focusedSquare, FIND_WHITE_SQUARE);
// if newSquare == NULL (possibly again), it's the last square in the word,
// and the focus won't change.
}
Expand Down Expand Up @@ -1696,7 +1696,7 @@ XGridCtrl::OnBackspace(int WXUNUSED(mod))
{
wxASSERT(! IsEmpty());
SetSquareText(*m_focusedSquare, _T(""));
SetFocusedSquare(m_focusedWord->FindPrevSquare(m_focusedSquare),
SetFocusedSquare(m_focusedWord->FindPrevSquare(m_focusedSquare, FIND_WHITE_SQUARE),
m_focusedWord);
}

Expand Down