proper fix for preview window's 'please select 1 card' message

setting self.card to None caused the following:

https://anki.tenderapp.com/discussions/beta-testing/661-anki-210-beta-7#comment_43180378
This commit is contained in:
Damien Elmes 2017-08-10 19:32:19 +10:00
parent 06fcccaf44
commit 9af28b7159

View file

@ -627,7 +627,6 @@ class Browser(QMainWindow):
if not show:
self.editor.setNote(None)
self.singleCard = False
self.card = None
else:
self.card = self.model.getCard(
self.form.tableView.selectionModel().currentIndex())
@ -1147,7 +1146,7 @@ where id in %s""" % ids2str(sf))
return
c = self.card
self._updatePreviewButtons()
if not c:
if not c or not self.singleCard:
txt = _("(please select 1 card)")
bodyclass = ""
else: