From 9a696a48ecc9e0b991c09da7148d1d990d75edca Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 23 Nov 2008 17:17:28 +0900 Subject: [PATCH] play sounds when previewing --- ankiqt/ui/facteditor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index 8c79570e6..967983163 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -6,6 +6,7 @@ from PyQt4.QtGui import * from PyQt4.QtCore import * import re, os, sys from anki.utils import parseTags, stripHTML, tidyHTML +from anki.sound import playFromText import anki.sound from ankiqt import ui import ankiqt @@ -628,6 +629,8 @@ class PreviewDialog(QDialog): "" + mungeQA(self.deck, c.htmlQuestion()) + mungeQA(self.deck, c.htmlAnswer())) + playFromText(c.question) + playFromText(c.answer) def onChange(self, idx): self.currentCard = idx