Skip to content

Commit

Permalink
Fix ticket 15727, SMS input not updating CGUIKeyboardGeneric
Browse files Browse the repository at this point in the history
  • Loading branch information
John Rennie authored and popcornmix committed Jun 30, 2015
1 parent 2b225b7 commit 7571e1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions xbmc/guilib/GUIEditControl.cpp
Expand Up @@ -654,15 +654,13 @@ void CGUIEditControl::SetCursorPosition(unsigned int iPosition)
void CGUIEditControl::OnSMSCharacter(unsigned int key)
{
assert(key < 10);
bool sendUpdate = false;
if (m_smsTimer.IsRunning())
{
// we're already entering an SMS character
if (key != m_smsLastKey || m_smsTimer.GetElapsedMilliseconds() > smsDelay)
{ // a different key was clicked than last time, or we have timed out
m_smsLastKey = key;
m_smsKeyIndex = 0;
sendUpdate = true;
}
else
{ // same key as last time within the appropriate time period
Expand All @@ -680,7 +678,7 @@ void CGUIEditControl::OnSMSCharacter(unsigned int key)
m_smsKeyIndex = m_smsKeyIndex % strlen(smsLetters[key]);

m_text2.insert(m_text2.begin() + m_cursorPos++, smsLetters[key][m_smsKeyIndex]);
UpdateText(sendUpdate);
UpdateText();
m_smsTimer.StartZero();
}

Expand Down

0 comments on commit 7571e1c

Please sign in to comment.