Browse Source

Fix order of destruction for sequences.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
4c45197003
5 changed files with 27 additions and 6 deletions
  1. +2
    -0
      Timeline/Annotation_Sequence.H
  2. +2
    -0
      Timeline/Audio_Sequence.C
  3. +11
    -0
      Timeline/Control_Sequence.C
  4. +0
    -4
      Timeline/Sequence.C
  5. +12
    -2
      Timeline/Track.C

+ 2
- 0
Timeline/Annotation_Sequence.H View File

@@ -83,6 +83,8 @@ public:

~Annotation_Sequence ( )
{
track()->remove( this );

log_destroy();
}



+ 2
- 0
Timeline/Audio_Sequence.C View File

@@ -49,6 +49,8 @@ Audio_Sequence::Audio_Sequence ( Track *track ) : Sequence( track )

Audio_Sequence::~Audio_Sequence ( )
{
track()->remove( this );

log_destroy();
}



+ 11
- 0
Timeline/Control_Sequence.C 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


+ 0
- 4
Timeline/Sequence.C View File

@@ -75,10 +75,6 @@ Sequence::~Sequence ( )
}

_widgets.clear();

parent()->redraw();
parent()->remove( this );
// log_destroy();
}

nframes_t


+ 12
- 2
Timeline/Track.C 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


Loading…
Cancel
Save