diff options
author | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
commit | d2a88cfaad5ac385fc3c6212c09ad7fbc38e9454 (patch) | |
tree | 387da0b38255003e1a971629ea0de32273ac3d3c /muse2/muse/mixer/strip.cpp | |
parent | 716f5a5b56a3b7ff59004ef0a1af5f98cb2a691c (diff) |
merged with release_2_0
Diffstat (limited to 'muse2/muse/mixer/strip.cpp')
-rw-r--r-- | muse2/muse/mixer/strip.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/muse2/muse/mixer/strip.cpp b/muse2/muse/mixer/strip.cpp index 54cd2e8c..f34d5320 100644 --- a/muse2/muse/mixer/strip.cpp +++ b/muse2/muse/mixer/strip.cpp @@ -297,10 +297,23 @@ Strip::~Strip() //--------------------------------------------------------- void Strip::setAutomationType(int t) - { - track->setAutomationType(AutomationType(t)); - MusEGlobal::song->update(SC_AUTOMATION); - } +{ + // If going to OFF mode, need to update current 'manual' values from the automation values at this time... + if(t == AUTO_OFF && track->automationType() != AUTO_OFF) // && track->automationType() != AUTO_WRITE) + { + // May have a lot to do in updateCurValues, so try using idle. + MusEGlobal::audio->msgIdle(true); + track->setAutomationType(AutomationType(t)); + if(!track->isMidiTrack()) + (static_cast<MusECore::AudioTrack*>(track))->controller()->updateCurValues(MusEGlobal::audio->curFramePos()); + MusEGlobal::audio->msgIdle(false); + } + else + // Try it within one message. + MusEGlobal::audio->msgSetTrackAutomationType(track, t); + + MusEGlobal::song->update(SC_AUTOMATION); +} void Strip::resizeEvent(QResizeEvent* ev) { |