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)
def updateVocabDefs(self):
html = reader_util.buildVocabDefs(
self.state.vocabDefs[:self.preferences['maxResults']],
self.ankiIsFactValid
)
def updateVocabDefs(self, trim=True):
vocabDefs = self.state.vocabDefs
if trim:
vocabDefs = vocabDefs[:self.preferences['maxResults']]
html = reader_util.buildVocabDefs(vocabDefs, self.ankiIsFactValid)
self.textVocabDefs.setHtml(html)
def updateKanjiDefs(self):
html = reader_util.buildKanjiDefs(
self.state.kanjiDefs[:self.preferences['maxRsults']],
self.ankiIsFactValid
)
def updateKanjiDefs(self, trim=True):
kanjiDefs = self.state.kanjiDefs
if trim:
kanjiDefs = kanjiDefs[:self.preferences['maxResults']]
html = reader_util.buildKanjiDefs(kanjiDefs, self.ankiIsFactValid)
self.textKanjiDefs.setHtml(html)
@ -562,8 +564,8 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader):
if self.dockKanji.isVisible():
self.state.kanjiDefs += self.language.findCharacters(word)
self.updateVocabDefs()
self.updateKanjiDefs()
self.updateVocabDefs(False)
self.updateKanjiDefs(False)
def setStatus(self, status):