diff --git a/honoka/src/multiconvertor.cpp b/honoka/src/multiconvertor.cpp index 4242c86..f8f6b11 100644 --- a/honoka/src/multiconvertor.cpp +++ b/honoka/src/multiconvertor.cpp @@ -121,6 +121,7 @@ result.kouho.clear(); ResultList l; MultiResultList m; + vector rs; // �ᥤ���Convertor����ޤ������� ResultList t = instance->m_def_convertor->getResultList(p,kt); m.list.Title = t.Title; @@ -137,6 +138,8 @@ m.list.kouho.push_back(t.kouho[j]); } } + rs.push_back(m); + m.list = t; results.push_back(m); // ����¾��Convertor��������� for(unsigned int i = 0;i < instance->convertors.size();i ++) { @@ -157,20 +160,22 @@ m.list.kouho.push_back(t.kouho[j]); } } + rs.push_back(m); + m.list = t; results.push_back(m); } } // �ꥹ�������� - for(unsigned int i = 0;i < results.size();i ++) { - for(unsigned int j = 0;j < results[i].list.count();j ++) { - int rp = l.find(results[i].list.kouho[j].kanji); + for(unsigned int i = 0;i < rs.size();i ++) { + for(unsigned int j = 0;j < rs[i].list.count();j ++) { + int rp = l.find(rs[i].list.kouho[j].kanji); if (rp != -1) { l.kouho[rp].label = l.kouho[rp].label + utf8_mbstowcs(String(",")) + - utf8_mbstowcs(results[i].convertor->getPropertyName()); + utf8_mbstowcs(rs[i].convertor->getPropertyName()); } else { - l.kouho.push_back(ResultEntry(results[i].list.kouho[j].kanji, - results[i].list.kouho[j].kanji + utf8_mbstowcs(String(" (")) + - utf8_mbstowcs(results[i].convertor->getPropertyName()))); + l.kouho.push_back(ResultEntry(rs[i].list.kouho[j].kanji, + rs[i].list.kouho[j].kanji + utf8_mbstowcs(String(" (")) + + utf8_mbstowcs(rs[i].convertor->getPropertyName()))); } } } @@ -185,6 +190,10 @@ bool MultiConvertor::select(int p) { if (p < result.kouho.size()) texts[getPos()] = result.kouho[p].kanji; + for(unsigned int i = 0;i < results.size();i ++) { + int ps = results[i].list.find(result.kouho[p].kanji); + if (ps != -1) results[i].convertor->select(ps); + } return true; } @@ -232,7 +241,10 @@ } void MultiConvertor::updateFrequency() { - // ̤������ + for(unsigned int i = 0;i < instance->convertors.size();i ++) { + if (nuc.find(instance->convertors[i]) != nuc.end()) continue; + instance->convertors[i]->updateFrequency(); + } return; }