Skip to content

Commit

Permalink
Initialize variables in AutomationClip's copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
regulus79 committed Sep 22, 2024
1 parent 650b8b4 commit 858330a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/core/AutomationClip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ AutomationClip::AutomationClip( const AutomationClip & _clip_to_copy ) :
m_autoTrack( _clip_to_copy.m_autoTrack ),
m_objects( _clip_to_copy.m_objects ),
m_tension( _clip_to_copy.m_tension ),
m_progressionType( _clip_to_copy.m_progressionType )
m_progressionType(_clip_to_copy.m_progressionType),
m_dragging(false),
m_isRecording(_clip_to_copy.m_isRecording),
m_lastRecordedValue(0)
{
// Locks the mutex of the copied AutomationClip to make sure it
// doesn't change while it's being copied
Expand Down
4 changes: 0 additions & 4 deletions src/gui/clips/AutomationClipView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,6 @@ bool AutomationClipView::splitClip(const TimePos pos)

rightClip->movePosition(splitPos);
rightClip->changeLength(m_initialClipEnd - splitPos);

// For some reason, the new clips sometime randomly put themselves in record mode. This is a temportary fix which forces them to match the original clip.
rightClip->setRecording(m_clip->isRecording());
leftClip->setRecording(m_clip->isRecording());

m_clip->getTrack()->restoreJournallingState();
close();
Expand Down

0 comments on commit 858330a

Please sign in to comment.