Make deletion of container widgets undoable!
This commit is contained in:
parent
0eeb63749f
commit
aa0f65af21
|
@ -83,9 +83,15 @@ public:
|
|||
|
||||
~Annotation_Sequence ( )
|
||||
{
|
||||
Loggable::block_start();
|
||||
|
||||
clear();
|
||||
|
||||
log_destroy();
|
||||
|
||||
track()->remove( this );
|
||||
|
||||
Loggable::block_end();
|
||||
}
|
||||
|
||||
int handle ( int m )
|
||||
|
|
|
@ -49,9 +49,15 @@ Audio_Sequence::Audio_Sequence ( Track *track ) : Sequence( track )
|
|||
|
||||
Audio_Sequence::~Audio_Sequence ( )
|
||||
{
|
||||
Loggable::block_start();
|
||||
|
||||
clear();
|
||||
|
||||
log_destroy();
|
||||
|
||||
track()->remove( this );
|
||||
|
||||
Loggable::block_end();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -52,6 +52,11 @@ Control_Sequence::Control_Sequence ( Track *track ) : Sequence( 0 )
|
|||
|
||||
Control_Sequence::~Control_Sequence ( )
|
||||
{
|
||||
|
||||
Loggable::block_start();
|
||||
|
||||
clear();
|
||||
|
||||
log_destroy();
|
||||
|
||||
engine->lock();
|
||||
|
@ -65,6 +70,8 @@ Control_Sequence::~Control_Sequence ( )
|
|||
delete _output;
|
||||
|
||||
_output = NULL;
|
||||
|
||||
Loggable::block_end();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -61,14 +61,9 @@ Sequence::init ( void )
|
|||
// clear_visible_focus();
|
||||
}
|
||||
|
||||
Sequence::~Sequence ( )
|
||||
void
|
||||
Sequence::clear ( void )
|
||||
{
|
||||
|
||||
DMESSAGE( "destroying sequence" );
|
||||
|
||||
if ( _name )
|
||||
free( _name );
|
||||
|
||||
for ( std::list <Sequence_Widget*>::iterator i = _widgets.begin();
|
||||
i != _widgets.end(); ++i )
|
||||
{
|
||||
|
@ -82,6 +77,17 @@ Sequence::~Sequence ( )
|
|||
_widgets.clear();
|
||||
}
|
||||
|
||||
Sequence::~Sequence ( )
|
||||
{
|
||||
DMESSAGE( "destroying sequence" );
|
||||
|
||||
if ( _name )
|
||||
free( _name );
|
||||
|
||||
if ( _widgets.size() )
|
||||
FATAL( "programming error: leaf destructor must call Sequence::clear()!" );
|
||||
}
|
||||
|
||||
nframes_t
|
||||
Sequence::x_to_offset ( int X )
|
||||
{
|
||||
|
|
|
@ -92,6 +92,7 @@ public:
|
|||
}
|
||||
|
||||
void sort ( void );
|
||||
void clear ( void );
|
||||
|
||||
nframes_t next ( nframes_t from ) const;
|
||||
nframes_t prev ( nframes_t from ) const;
|
||||
|
|
|
@ -247,6 +247,14 @@ Track::Track ( const char *L, int channels ) :
|
|||
|
||||
Track::~Track ( )
|
||||
{
|
||||
Loggable::block_start();
|
||||
|
||||
takes = NULL;
|
||||
control = NULL;
|
||||
annotation = NULL;
|
||||
|
||||
Fl_Group::clear();
|
||||
|
||||
log_destroy();
|
||||
|
||||
timeline->remove_track( this );
|
||||
|
@ -256,12 +264,11 @@ Track::~Track ( )
|
|||
configure_outputs( 0 );
|
||||
|
||||
_sequence = NULL;
|
||||
takes = NULL;
|
||||
control = NULL;
|
||||
annotation = NULL;
|
||||
|
||||
if ( _name )
|
||||
free( _name );
|
||||
|
||||
Loggable::block_end();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue