Timeline: Don't forget to log changing takes after the fact.

This commit is contained in:
Jonathan Moore Liles 2020-10-25 21:57:21 -07:00
parent 0157734a30
commit 54e8737a90
2 changed files with 31 additions and 5 deletions

View File

@ -177,6 +177,7 @@ Audio_Sequence::set ( Log_Entry &e )
assert( t );
/* FIXME: this causes the sequences to be set twice in the replay logic, first when the sequence is created, then when track sequence is assigned. */
t->sequence( this );
}
else if ( ! strcmp( ":name", s ) )

View File

@ -604,6 +604,15 @@ Track::remove ( Audio_Sequence *t )
if ( ! takes )
return;
Loggable::block_start();
Logger log(this);
if ( t->id() == 0x2785 )
{
WARNING( "****** 0x2785 removed here *****");
}
if ( sequence() == t )
{
pack->remove( t );
@ -617,7 +626,9 @@ Track::remove ( Audio_Sequence *t )
else
takes->remove( t );
/* delete t; */
delete t;
Loggable::block_end();
adjust_size();
}
@ -647,9 +658,18 @@ Track::remove ( Control_Sequence *t )
void
Track::sequence ( Audio_Sequence * t )
{
Logger log(this);
/* FIXME: testing */
if ( sequence() != NULL && sequence()->id() == 0x2785 )
{
DMESSAGE( "****** Here *****");
}
if ( sequence() == t )
{
DMESSAGE( "Attempt to set sequence twice" );
/* ASSERT( false, "Attempt to set same sequence twice" ); */
DMESSAGE( "Attempt to set same sequence twice, %p == %p", t, sequence() );
return;
}
@ -873,8 +893,13 @@ Track::menu_cb ( const Fl_Menu_ *m )
else if ( !strcmp( picked, "Takes/New" ) )
{
timeline->track_lock.wrlock();
Loggable::block_start();
sequence( (Audio_Sequence*)sequence()->clone_empty() );
timeline->track_lock.unlock();
Loggable::block_end();
}
else if ( !strcmp( picked, "Takes/Remove" ) )
{