Browse Source

fixed crash reading block without chord attached

master
Ivan Holmes 5 years ago
parent
commit
12dab2a64a
  1. 2
      chordsheet/tableView.py

2
chordsheet/tableView.py

@ -70,7 +70,7 @@ class BlockTableView(MTableView):
def populate(self, bList): def populate(self, bList):
self.model.removeRows(0, self.model.rowCount()) self.model.removeRows(0, self.model.rowCount())
for b in bList: for b in bList:
rowList = [QtGui.QStandardItem(b.chord.name), QtGui.QStandardItem(str(b.length)), QtGui.QStandardItem(b.notes)]
rowList = [QtGui.QStandardItem((b.chord.name if b.chord else "")), QtGui.QStandardItem(str(b.length)), QtGui.QStandardItem(b.notes)]
for item in rowList: for item in rowList:
item.setEditable(False) item.setEditable(False)
item.setDropEnabled(False) item.setDropEnabled(False)

Loading…
Cancel
Save