mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
only play audio once
This commit is contained in:
parent
56c5bafe97
commit
a7a7ae1cf2
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,7 @@ class CardLayout(QDialog):
|
||||||
def setupCards(self):
|
def setupCards(self):
|
||||||
self.needFormatRebuild = False
|
self.needFormatRebuild = False
|
||||||
self.updatingCards = False
|
self.updatingCards = False
|
||||||
|
self.playedAudio = False
|
||||||
# replace with more appropriate size hints
|
# replace with more appropriate size hints
|
||||||
for e in ("cardQuestion", "cardAnswer"):
|
for e in ("cardQuestion", "cardAnswer"):
|
||||||
w = getattr(self.form, e)
|
w = getattr(self.form, e)
|
||||||
|
@ -249,8 +250,10 @@ order by n""", id=card.id)
|
||||||
c)
|
c)
|
||||||
+ "</body></html>")
|
+ "</body></html>")
|
||||||
clearAudioQueue()
|
clearAudioQueue()
|
||||||
playFromText(c.question)
|
if not self.playedAudio:
|
||||||
playFromText(c.answer)
|
playFromText(c.question)
|
||||||
|
playFromText(c.answer)
|
||||||
|
self.playedAudio = True
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
modified = False
|
modified = False
|
||||||
|
|
Loading…
Reference in a new issue