mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
fix errors when previewing
This commit is contained in:
parent
d1ebc8d805
commit
bcaf5762ec
1 changed files with 2 additions and 2 deletions
|
@ -61,12 +61,12 @@ class DataModel(QAbstractTableModel):
|
|||
######################################################################
|
||||
|
||||
def rowCount(self, parent):
|
||||
if parent.isValid():
|
||||
if parent and parent.isValid():
|
||||
return 0
|
||||
return len(self.cards)
|
||||
|
||||
def columnCount(self, parent):
|
||||
if parent.isValid():
|
||||
if parent and parent.isValid():
|
||||
return 0
|
||||
return len(self.activeCols)
|
||||
|
||||
|
|
Loading…
Reference in a new issue