Browse Source

adding midievents to refreshScene

tags/1.9.6
rhetr 10 years ago
parent
commit
635a0f261a
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      source/native-plugins/resources/midiseq-ui

+ 5
- 1
source/native-plugins/resources/midiseq-ui View File

@@ -703,10 +703,14 @@ class PianoRoll(QGraphicsScene):
for note in self.notes[:]: for note in self.notes[:]:
if note.note[1] >= (self.num_measures * self.time_sig[0]): if note.note[1] >= (self.num_measures * self.time_sig[0]):
self.notes.remove(note) self.notes.remove(note)
self.midievent.emit(["midievent-remove", note.note[0], note.note[1], note.note[2], note.note[3]])
elif note.note[2] > self.max_note_length: elif note.note[2] > self.max_note_length:
new_note = note.note
new_note = note.note[:]
new_note[2] = self.max_note_length
self.notes.remove(note) self.notes.remove(note)
self.drawNote(new_note[0], new_note[1], self.max_note_length, new_note[3], False) self.drawNote(new_note[0], new_note[1], self.max_note_length, new_note[3], False)
self.midievent.emit(["midievent-remove", note.note[0], note.note[1], note.note[2], note.note[3]])
self.midievent.emit(["midievent-add", new_note[0], new_note[1], new_note[2], new_note[3]])
list(map(self.addItem, self.notes)) list(map(self.addItem, self.notes))
if self.views(): if self.views():
self.views()[0].setSceneRect(self.itemsBoundingRect()) self.views()[0].setSceneRect(self.itemsBoundingRect())


Loading…
Cancel
Save