fix errors when previewing

This commit is contained in:
Damien Elmes 2017-02-23 16:21:00 +10:00
parent d1ebc8d805
commit bcaf5762ec

View File

@ -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)