From a8c8fa89d916bded2905e0a5a8c05ac30e159902 Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Tue, 13 Sep 2011 23:59:23 +0000 Subject: 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. --- muse2/muse/arranger/pcanvas.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') 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 && -- cgit v1.2.3