diff options
author | Tim E. Real <termtech@rogers.com> | 2011-09-13 23:59:23 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2011-09-13 23:59:23 +0000 |
commit | a8c8fa89d916bded2905e0a5a8c05ac30e159902 (patch) | |
tree | a921aa8311d8542a77f6cbfc952561691cb7bd8d /muse2/muse/arranger/pcanvas.cpp | |
parent | 56d4a94c40bbcae6a2862fba3e2923542511779f (diff) |
Added: You can now insert new tracks instead of always at the track list end.
If main menu 'Add track': Inserts before currently selected track, else adds at end.
If Track List right-click existing Track Name: New 'Insert track' menu inserts before clicked track.
If Track List right-click on empty space, or Mixer 'Create': Adds at end, as usual.
Fixed track selection bug: Track info panel not clearing when clicking empty area.
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r-- | muse2/muse/arranger/pcanvas.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp index 1dd4c44d..056dcce7 100644 --- a/muse2/muse/arranger/pcanvas.cpp +++ b/muse2/muse/arranger/pcanvas.cpp @@ -349,7 +349,7 @@ UndoOp PartCanvas::moveItem(MusEWidget::CItem* item, const QPoint& newpos, DragT ntrack = tracks->size(); if (MusEGlobal::debugMsg) printf("PartCanvas::moveItem - add new track\n"); - Track* newTrack = song->addTrack(int(type)); + Track* newTrack = song->addTrack(type, false); // Add at end of list. if (type == Track::WAVE) { WaveTrack* st = (WaveTrack*) track; WaveTrack* dt = (WaveTrack*) newTrack; @@ -662,17 +662,17 @@ QMenu* PartCanvas::genItemPopup(MusEWidget::CItem* item) partPopup->addSeparator(); switch(trackType) { case Track::MIDI: { - partPopup->addAction(MusEGlobal::muse->arranger->parentWin->startPianoEditAction); - partPopup->addMenu(MusEGlobal::muse->arranger->parentWin->scoreSubmenu); - partPopup->addAction(MusEGlobal::muse->arranger->parentWin->startScoreEditAction); - partPopup->addAction(MusEGlobal::muse->arranger->parentWin->startListEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startPianoEditAction); + partPopup->addMenu(MusEGlobal::muse->arranger()->parentWin->scoreSubmenu); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startScoreEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startListEditAction); QAction *act_mexport = partPopup->addAction(tr("save part to disk")); act_mexport->setData(16); } break; case Track::DRUM: { - partPopup->addAction(MusEGlobal::muse->arranger->parentWin->startDrumEditAction); - partPopup->addAction(MusEGlobal::muse->arranger->parentWin->startListEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startDrumEditAction); + partPopup->addAction(MusEGlobal::muse->arranger()->parentWin->startListEditAction); QAction *act_dexport = partPopup->addAction(tr("save part to disk")); act_dexport->setData(16); } @@ -3236,9 +3236,9 @@ void PartCanvas::viewDropEvent(QDropEvent* event) if (!track) { // we need to create a track for this drop if (text.endsWith(".mpt", Qt::CaseInsensitive)) { - track = song->addTrack((Track::MIDI)); + track = song->addTrack(Track::MIDI, false); // Add at end of list. } else { - track = song->addTrack((Track::WAVE)); + track = song->addTrack(Track::WAVE, false); // Add at end of list. } } if (track->type() == Track::WAVE && |