only prompt type in the answer once

This commit is contained in:
Damien Elmes 2009-01-06 10:46:20 +09:00
parent 61e3690831
commit 9ff30f0c26
2 changed files with 8 additions and 3 deletions

View file

@ -438,7 +438,12 @@ new:
def showAnswerButton(self):
if self.currentCard.cardModel.typeAnswer:
self.mainWin.buttonStack.setCurrentIndex(4)
self.mainWin.typeAnswerField.selectAll()
if not unicode(self.mainWin.typeAnswerField.text()):
self.mainWin.typeAnswerField.setText(_(
"Type in the answer and hit enter"))
self.mainWin.typeAnswerField.selectAll()
else:
self.mainWin.typeAnswerField.setText("")
else:
self.mainWin.buttonStack.setCurrentIndex(0)
self.mainWin.showAnswerButton.setFocus()

View file

@ -733,7 +733,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>542</width>
<width>428</width>
<height>49</height>
</rect>
</property>
@ -762,7 +762,7 @@
</font>
</property>
<property name="text" >
<string>Type answer and hit enter</string>
<string/>
</property>
</widget>
</item>