Skip to content

Commit

Permalink
Delay adding tracks to track containers until the constructor completes
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Nov 25, 2024
1 parent 1c68859 commit 3c0c167
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ Track::Track( Type type, TrackContainer * tc ) :
m_mutedModel( false, this, tr( "Mute" ) ), /*!< For controlling track muting */
m_soloModel( false, this, tr( "Solo" ) ), /*!< For controlling track soloing */
m_clips() /*!< The clips (segments) */
{
m_trackContainer->addTrack( this );
{
m_height = -1;
}

Expand Down Expand Up @@ -117,6 +116,8 @@ Track * Track::create( Type tt, TrackContainer * tc )
default: break;
}

tc->addTrack(t);

if (tc == Engine::patternStore() && t)
{
t->createClipsForPattern(Engine::patternStore()->numOfPatterns() - 1);
Expand Down

0 comments on commit 3c0c167

Please sign in to comment.