forked from openlp/openlp
Fix crash on delete of last record in list
This commit is contained in:
parent
a9bad4aac7
commit
472ef981b6
@ -59,6 +59,8 @@ class TextListData(QtCore.QAbstractListModel):
|
||||
if row > len(self.items): # if the last row is selected and deleted, we then get called with an empty row!
|
||||
return QtCore.QVariant()
|
||||
if role == QtCore.Qt.DisplayRole:
|
||||
if row == self.rowCount(None):
|
||||
row -= 1
|
||||
retval = self.items[row][1]
|
||||
else:
|
||||
retval = QtCore.QVariant()
|
||||
|
Loading…
Reference in New Issue
Block a user