Browse Source

fix crash when 'remove chord' is pressed but there

are no chords
master
Ivan Holmes 5 years ago
parent
commit
c50c6b9d3c
  1. 2
      gui.py

2
gui.py

@ -358,6 +358,7 @@ class DocumentWindow(QMainWindow):
self.window.blockChordComboBox.addItems(list(self.chordDict.keys()))
def removeChordAction(self):
if self.window.chordTableView.selectionModel().hasSelection(): # check for selection
self.updateChords()
row = self.window.chordTableView.selectionModel().currentIndex().row()
@ -421,6 +422,7 @@ class DocumentWindow(QMainWindow):
self.window.blockNotesLineEdit.repaint()
def removeBlockAction(self):
if self.window.blockTableView.selectionModel().hasSelection(): # check for selection
self.updateBlocks()
row = self.window.blockTableView.selectionModel().currentIndex().row()

Loading…
Cancel
Save