Skip to content

Commit

Permalink
Fix errors caused by deleting measures on short lines.
Browse files Browse the repository at this point in the history
Fixes #296.
  • Loading branch information
Whatang committed Dec 28, 2012
1 parent 4d80482 commit aafacda
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GUI/QScore.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,14 +528,16 @@ def clearMeasures(self, np = None):
def deleteMeasures(self, np = None):
if np is not None:
command = DeleteMeasureCommand(self, np)
self.clearDragSelection()
self.addCommand(command)
else:
if not self.hasDragSelection():
return
start = self._dragSelection[0]
measureIndex = self._score.getMeasureIndex(start)
self.beginMacro("delete measures")
measures = list(self.iterDragSelection())
self.clearDragSelection()
self.beginMacro("delete measures")
for unused in measures:
command = DeleteMeasureCommand(self, start, measureIndex)
self.addCommand(command)
Expand Down

0 comments on commit aafacda

Please sign in to comment.