1

Do not limit result listing when doing import

Former-commit-id: 5570d527091f29b7a393b735ee1889323c2e6fb6
This commit is contained in:
Alex Yatskov 2014-12-20 20:51:54 +09:00
parent d41cf00e7f
commit 3e489b2fbc

View File

@ -535,19 +535,21 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader):
self.preferences.updateRecentFile(self.state.filename, self.state.scanPosition) self.preferences.updateRecentFile(self.state.filename, self.state.scanPosition)
def updateVocabDefs(self): def updateVocabDefs(self, trim=True):
html = reader_util.buildVocabDefs( vocabDefs = self.state.vocabDefs
self.state.vocabDefs[:self.preferences['maxResults']], if trim:
self.ankiIsFactValid vocabDefs = vocabDefs[:self.preferences['maxResults']]
)
html = reader_util.buildVocabDefs(vocabDefs, self.ankiIsFactValid)
self.textVocabDefs.setHtml(html) self.textVocabDefs.setHtml(html)
def updateKanjiDefs(self): def updateKanjiDefs(self, trim=True):
html = reader_util.buildKanjiDefs( kanjiDefs = self.state.kanjiDefs
self.state.kanjiDefs[:self.preferences['maxRsults']], if trim:
self.ankiIsFactValid kanjiDefs = kanjiDefs[:self.preferences['maxResults']]
)
html = reader_util.buildKanjiDefs(kanjiDefs, self.ankiIsFactValid)
self.textKanjiDefs.setHtml(html) self.textKanjiDefs.setHtml(html)
@ -562,8 +564,8 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader):
if self.dockKanji.isVisible(): if self.dockKanji.isVisible():
self.state.kanjiDefs += self.language.findCharacters(word) self.state.kanjiDefs += self.language.findCharacters(word)
self.updateVocabDefs() self.updateVocabDefs(False)
self.updateKanjiDefs() self.updateKanjiDefs(False)
def setStatus(self, status): def setStatus(self, status):