Browse Source

Properly handle removal of a track's active sequence.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
b25c206ceb
2 changed files with 15 additions and 1 deletions
  1. +3
    -0
      Timeline/Sequence.C
  2. +12
    -1
      Timeline/Track.C

+ 3
- 0
Timeline/Sequence.C View File

@@ -78,6 +78,9 @@ Sequence::~Sequence ( )

if ( _widgets.size() )
FATAL( "programming error: leaf destructor must call Sequence::clear()!" );

if ( parent() )
parent()->remove( this );
}



+ 12
- 1
Timeline/Track.C View File

@@ -490,7 +490,18 @@ Track::remove ( Audio_Sequence *t )

timeline->wrlock();

takes->remove( t );
if ( sequence() == t )
{
pack->remove( t );

if ( takes->children() )
sequence( (Audio_Sequence*)takes->child( 0 ) );
else
/* FIXME: should this ever happen? */
_sequence = NULL;
}
else
takes->remove( t );

/* delete t; */



Loading…
Cancel
Save