mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Tweak previewer navigation button display
This commit is contained in:
parent
17d68cc957
commit
0bcf60fea6
1 changed files with 2 additions and 1 deletions
|
@ -1087,7 +1087,8 @@ where id in %s""" % ids2str(sf))
|
||||||
def _updatePreviewButtons(self):
|
def _updatePreviewButtons(self):
|
||||||
if not self._previewWindow:
|
if not self._previewWindow:
|
||||||
return
|
return
|
||||||
canBack = self.currentRow() > 0 or self._previewState == "question"
|
current = self.currentRow()
|
||||||
|
canBack = (current > 0 or (current == 0 and self._previewState == "answer" ))
|
||||||
self._previewPrev.setEnabled(not not (self.singleCard and canBack))
|
self._previewPrev.setEnabled(not not (self.singleCard and canBack))
|
||||||
canForward = self.currentRow() < self.model.rowCount(None) - 1 or \
|
canForward = self.currentRow() < self.model.rowCount(None) - 1 or \
|
||||||
self._previewState == "question"
|
self._previewState == "question"
|
||||||
|
|
Loading…
Reference in a new issue