mirror of
https://github.com/ankitects/anki.git
synced 2025-11-15 09:07:11 -05: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):
|
def rowCount(self, parent):
|
||||||
if parent.isValid():
|
if parent and parent.isValid():
|
||||||
return 0
|
return 0
|
||||||
return len(self.cards)
|
return len(self.cards)
|
||||||
|
|
||||||
def columnCount(self, parent):
|
def columnCount(self, parent):
|
||||||
if parent.isValid():
|
if parent and parent.isValid():
|
||||||
return 0
|
return 0
|
||||||
return len(self.activeCols)
|
return len(self.activeCols)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue