Fix order of destruction for sequences.

pull/3/head
Jonathan Moore Liles 2008-05-26 01:20:49 -05:00
parent 3717eb12c3
commit 4c45197003
5 changed files with 27 additions and 6 deletions

View File

@ -83,6 +83,8 @@ public:
~Annotation_Sequence ( )
{
track()->remove( this );
log_destroy();
}

View File

@ -49,6 +49,8 @@ Audio_Sequence::Audio_Sequence ( Track *track ) : Sequence( track )
Audio_Sequence::~Audio_Sequence ( )
{
track()->remove( this );
log_destroy();
}

View File

@ -25,6 +25,7 @@ using namespace std;
#include "Track.H"
#include "Engine/Port.H"
#include "Engine/Engine.H" // for lock()
#include "Transport.H" // for transport->frame
bool Control_Sequence::draw_with_gradient = true;
@ -50,9 +51,19 @@ Control_Sequence::~Control_Sequence ( )
{
log_destroy();
engine->lock();
track()->remove( this );
engine->unlock();
_output->shutdown();
delete _output;
_output = NULL;
log_destroy();
}
void

View File

@ -75,10 +75,6 @@ Sequence::~Sequence ( )
}
_widgets.clear();
parent()->redraw();
parent()->remove( this );
// log_destroy();
}
nframes_t

View File

@ -354,13 +354,25 @@ Track::add ( Audio_Sequence * t )
void
Track::remove ( Audio_Sequence *t )
{
timeline->wrlock();
takes->remove( t );
timeline->unlock();
resize();
// take_menu->remove( t->name() );
}
void
Track::remove ( Annotation_Sequence *t )
{
annotation->remove( t );
resize();
}
void
Track::remove ( Control_Sequence *t )
{
@ -371,8 +383,6 @@ Track::remove ( Control_Sequence *t )
engine->unlock();
resize();
redraw();
}
void