diff options
author | Hiroshi Sumita <hsumita@google.com> | 2012-03-28 11:10:37 +0900 |
---|---|---|
committer | Hiroshi Sumita <hsumita@google.com> | 2012-03-28 11:10:37 +0900 |
commit | b017ae7d52c6c7a23e8dfa01c5e3246a7099c7e4 (patch) | |
tree | d83e879a1d3b69b80974a54251490ec084047a8f | |
parent | f340adf7daec223959ba4144cff4d85852d4ed13 (diff) | |
download | pyzy-b017ae7d52c6c7a23e8dfa01c5e3246a7099c7e4.tar.gz |
Fixes a behavior of focusedCandidate().
BUG=focusedCandidate is not cleared after some operations.
TEST=Test manually with client codes.
Review URL: https://codereview.appspot.com/5927049
-rw-r--r-- | src/PyZyPhoneticContext.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PyZyPhoneticContext.cc b/src/PyZyPhoneticContext.cc index 543db97..754006a 100644 --- a/src/PyZyPhoneticContext.cc +++ b/src/PyZyPhoneticContext.cc @@ -79,6 +79,7 @@ void PhoneticContext::updateLookupTable (void) { m_candidates.clear (); + m_focused_candidate = 0; for (size_t i = 0; i < m_special_phrases.size (); ++i) { Candidate candidate; @@ -167,7 +168,7 @@ PhoneticContext::focusCandidate (size_t i) } m_focused_candidate = i; - update (); + updatePreeditText(); return true; } @@ -228,7 +229,7 @@ PhoneticContext::resetCandidate (size_t i) i -= m_special_phrases.size (); if (m_phrase_editor.resetCandidate (i)) { - update (); + updateLookupTable(); } return true; |