Skip to content

Commit d5e06b9

Browse files
authored
Merge pull request #878 from ChiahongHong/pinyin
Fix pinyin mode persisting after switching to another layout
2 parents 7fc101f + 7445253 commit d5e06b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Engine/Mandarin/Mandarin.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ class BopomofoReadingBuffer {
381381

382382
void setKeyboardLayout(const BopomofoKeyboardLayout* layout) {
383383
layout_ = layout;
384+
pinyin_mode_ = layout == BopomofoKeyboardLayout::HanyuPinyinLayout();
384385

385-
if (layout == BopomofoKeyboardLayout::HanyuPinyinLayout()) {
386-
pinyin_mode_ = true;
386+
if (pinyin_mode_) {
387387
pinyin_sequence_ = "";
388388
}
389389
}

0 commit comments

Comments
 (0)