From 3e6f82d7b9b29e8df7d63658540b762203b820f6 Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Fri, 7 Oct 2011 14:53:22 +0000 Subject: added new style drum tracks atm, they aren't different from midi tracks except that they launch a drum editor by default added markers to help me finding the places to change TODO: instrument muting, in-note-mapping etc... --- muse2/muse/arranger/pcanvas.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 5b5f3a6f..eaeec291 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -238,6 +238,7 @@ void PartCanvas::viewMouseDoubleClickEvent(QMouseEvent* event) switch(track->type()) { case Track::MIDI: case Track::DRUM: + case Track::NEW_DRUM: { MidiPart* part = new MidiPart((MidiTrack*)track); part->setTick(pos[1]); @@ -521,6 +522,7 @@ MusEWidget::CItem* PartCanvas::newItem(const QPoint& pos, int) switch(track->type()) { case Track::MIDI: case Track::DRUM: + case Track::NEW_DRUM: pa = new MidiPart((MidiTrack*)track); pa->setTick(x); pa->setLenTick(0); @@ -659,6 +661,7 @@ QMenu* PartCanvas::genItemPopup(MusEWidget::CItem* item) act_mexport->setData(16); } break; + case Track::NEW_DRUM: case Track::DRUM: { partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startDrumEditAction); partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startListEditAction); @@ -1259,6 +1262,7 @@ void PartCanvas::keyPress(QKeyEvent* event) // else track is midi switch (track->type()) { + case Track::NEW_DRUM: case Track::DRUM: type = 3; break; @@ -2302,7 +2306,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi using std::pair; iEvent ito(events->lower_bound(to)); - bool isdrum = (mt->type() == Track::DRUM); + bool isdrum = (mt->type() == Track::DRUM || mt->type() == Track::NEW_DRUM); // draw controllers ------------------------------------------ p.setPen(QColor(192,192,color_brightness/2)); -- cgit v1.2.3