diff options
Diffstat (limited to 'muse2/muse/song.cpp')
-rw-r--r-- | muse2/muse/song.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp index 412b52f1..d13f8398 100644 --- a/muse2/muse/song.cpp +++ b/muse2/muse/song.cpp @@ -393,10 +393,6 @@ void Song::duplicateTracks() if((*it)->selected()) { Track::TrackType type = (*it)->type(); - // TODO: Handle synths. p4.0.47 - if(type == Track::AUDIO_SOFTSYNTH) - continue; - if(type == Track::DRUM) ++drum_found; else if(type == Track::NEW_DRUM) @@ -507,7 +503,6 @@ void Song::duplicateTracks() { new_track->assign(*track, flags); #else - if(track->type() != Track::AUDIO_SOFTSYNTH) // TODO: Handle synths. p4.0.47 { Track* new_track = track->clone(flags); #endif @@ -519,7 +514,7 @@ void Song::duplicateTracks() addUndo(MusECore::UndoOp(MusECore::UndoOp::AddTrack, idx, new_track)); msgInsertTrack(new_track, idx, false); // No undo. insertTrack3(new_track, idx); - } + } } } --trackno; @@ -2458,14 +2453,10 @@ int Song::execAutomationCtlPopup(AudioTrack* track, const QPoint& menupos, int a { CtrlList *cl = icl->second; canAdd = true; - frame = MusEGlobal::audio->pos().frame(); - - bool en1, en2; - track->controllersEnabled(acid, &en1, &en2); - + bool en = track->controllerEnabled(acid); AutomationType at = track->automationType(); - if(!MusEGlobal::automation || at == AUTO_OFF || !en1 || !en2) + if(!MusEGlobal::automation || at == AUTO_OFF || !en) ctlval = cl->curVal(); else ctlval = cl->value(frame); @@ -2830,6 +2821,25 @@ void Song::updateSoloStates() } //--------------------------------------------------------- +// reenableTouchedControllers +// Enable all track and plugin controllers, and synth controllers if applicable, which are NOT in AUTO_WRITE mode. +//--------------------------------------------------------- + +void Song::reenableTouchedControllers() +{ + for(iTrack it = _tracks.begin(); it != _tracks.end(); ++it) + { + if((*it)->isMidiTrack()) + continue; + AudioTrack* t = static_cast<AudioTrack*>(*it); + AutomationType at = t->automationType(); + if(at == AUTO_WRITE) // Exclude write mode because controls need to remain disabled if pressed before play. + continue; + t->enableAllControllers(); + } +} + +//--------------------------------------------------------- // clearRecAutomation //--------------------------------------------------------- |