@@ -83,6 +83,8 @@ public: | |||||
~Annotation_Sequence ( ) | ~Annotation_Sequence ( ) | ||||
{ | { | ||||
track()->remove( this ); | |||||
log_destroy(); | log_destroy(); | ||||
} | } | ||||
@@ -49,6 +49,8 @@ Audio_Sequence::Audio_Sequence ( Track *track ) : Sequence( track ) | |||||
Audio_Sequence::~Audio_Sequence ( ) | Audio_Sequence::~Audio_Sequence ( ) | ||||
{ | { | ||||
track()->remove( this ); | |||||
log_destroy(); | log_destroy(); | ||||
} | } | ||||
@@ -25,6 +25,7 @@ using namespace std; | |||||
#include "Track.H" | #include "Track.H" | ||||
#include "Engine/Port.H" | #include "Engine/Port.H" | ||||
#include "Engine/Engine.H" // for lock() | |||||
#include "Transport.H" // for transport->frame | #include "Transport.H" // for transport->frame | ||||
bool Control_Sequence::draw_with_gradient = true; | bool Control_Sequence::draw_with_gradient = true; | ||||
@@ -50,9 +51,19 @@ Control_Sequence::~Control_Sequence ( ) | |||||
{ | { | ||||
log_destroy(); | log_destroy(); | ||||
engine->lock(); | |||||
track()->remove( this ); | |||||
engine->unlock(); | |||||
_output->shutdown(); | _output->shutdown(); | ||||
delete _output; | delete _output; | ||||
_output = NULL; | |||||
log_destroy(); | |||||
} | } | ||||
void | void | ||||
@@ -75,10 +75,6 @@ Sequence::~Sequence ( ) | |||||
} | } | ||||
_widgets.clear(); | _widgets.clear(); | ||||
parent()->redraw(); | |||||
parent()->remove( this ); | |||||
// log_destroy(); | |||||
} | } | ||||
nframes_t | nframes_t | ||||
@@ -354,13 +354,25 @@ Track::add ( Audio_Sequence * t ) | |||||
void | void | ||||
Track::remove ( Audio_Sequence *t ) | Track::remove ( Audio_Sequence *t ) | ||||
{ | { | ||||
timeline->wrlock(); | |||||
takes->remove( t ); | takes->remove( t ); | ||||
timeline->unlock(); | |||||
resize(); | resize(); | ||||
// take_menu->remove( t->name() ); | // take_menu->remove( t->name() ); | ||||
} | } | ||||
void | |||||
Track::remove ( Annotation_Sequence *t ) | |||||
{ | |||||
annotation->remove( t ); | |||||
resize(); | |||||
} | |||||
void | void | ||||
Track::remove ( Control_Sequence *t ) | Track::remove ( Control_Sequence *t ) | ||||
{ | { | ||||
@@ -371,8 +383,6 @@ Track::remove ( Control_Sequence *t ) | |||||
engine->unlock(); | engine->unlock(); | ||||
resize(); | resize(); | ||||
redraw(); | |||||
} | } | ||||
void | void | ||||