From 21a99a0dd5efdb6b2f555b477c4b3f6b7429e01f Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 24 Dec 2012 18:58:39 -0800 Subject: [PATCH] enable browser --- yomi_base/anki_host.py | 10 +++++----- yomi_base/reader.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/yomi_base/anki_host.py b/yomi_base/anki_host.py index a0ab5d7..a164cc5 100644 --- a/yomi_base/anki_host.py +++ b/yomi_base/anki_host.py @@ -53,11 +53,11 @@ class Anki: return None if note.dupeOrEmpty() else note - #~ def browseNote(self, noteId): - #~ browser = ui.dialogs.get('CardList', self.window()) - #~ browser.dialog.filterEdit.setText('fid:' + str(noteId)) - #~ browser.updateSearch() - #~ browser.onnote() + def browseNote(self, noteId): + browser = ui.dialogs.get('CardList', self.window()) + browser.dialog.filterEdit.setText('fid:' + str(noteId)) + browser.updateSearch() + browser.onnote() def startEditing(self): diff --git a/yomi_base/reader.py b/yomi_base/reader.py index c836699..9325a53 100644 --- a/yomi_base/reader.py +++ b/yomi_base/reader.py @@ -284,9 +284,9 @@ class MainWindowReader(QtGui.QMainWindow): def onDefinitionDoubleClicked(self, item): - if self.anki: + if self.anki is not None: row = self.listDefinitions.row(item) - self.anki.browseFact(self.addedFacts[row]) + self.anki.browseNote(self.addedFacts[row]) def onVisibilityChanged(self, visible):