summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-10-07 14:53:22 +0000
committerFlorian Jung <flo@windfisch.org>2011-10-07 14:53:22 +0000
commit3e6f82d7b9b29e8df7d63658540b762203b820f6 (patch)
tree3e1a71a2bda678b1574ab88c59195b158c0a64ca /muse2/muse/arranger/pcanvas.cpp
parentf60ddccd6d328a5cebc4d524246e33b399a8dfdd (diff)
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...
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp6
1 files changed, 5 insertions, 1 deletions
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));