More work on cleaning up undo system.

This commit is contained in:
Jonathan Moore Liles 2008-02-28 05:55:09 -06:00
parent 66815ae8fb
commit f3d7abfe32
6 changed files with 22 additions and 4 deletions

View File

@ -157,6 +157,11 @@ public:
} }
~Region ( )
{
log_destroy();
}
Fl_Boxtype box ( void ) const { return Region::_box; } Fl_Boxtype box ( void ) const { return Region::_box; }
Fl_Align align ( void ) const { return (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_BOTTOM /*| FL_ALIGN_CLIP*/ | FL_ALIGN_INSIDE); } Fl_Align align ( void ) const { return (Fl_Align)(FL_ALIGN_LEFT | FL_ALIGN_BOTTOM /*| FL_ALIGN_CLIP*/ | FL_ALIGN_INSIDE); }

View File

@ -65,7 +65,10 @@ public:
} }
~Tempo_Point ( ) ~Tempo_Point ( )
{ if ( _label ) delete[] _label; } {
if ( _label ) delete[] _label;
log_destroy();
}
float tempo ( void ) const { return _tempo; } float tempo ( void ) const { return _tempo; }
void tempo ( float v ) { _tempo = v; } void tempo ( float v ) { _tempo = v; }

View File

@ -78,7 +78,10 @@ public:
} }
~Time_Point ( ) ~Time_Point ( )
{ if ( _label ) delete[] _label; } {
if ( _label ) delete[] _label;
log_destroy();
}
/* beats_per_bar ( void ) const { return _time.beats_per_bar; } */ /* beats_per_bar ( void ) const { return _time.beats_per_bar; } */
/* note_type ( void ) const { return _note_type; } */ /* note_type ( void ) const { return _note_type; } */

View File

@ -76,6 +76,8 @@ Track::draw ( void )
void void
Track::remove ( Track_Widget *r ) Track::remove ( Track_Widget *r )
{ {
Logger _log( this );
_widgets.remove( r ); _widgets.remove( r );
} }
@ -180,7 +182,7 @@ Track::handle ( int m )
if ( _queued_widget ) if ( _queued_widget )
{ {
remove( _queued_widget ); // remove( _queued_widget );
delete _queued_widget; delete _queued_widget;
_queued_widget = NULL; _queued_widget = NULL;
pushed = NULL; pushed = NULL;

View File

@ -43,6 +43,11 @@ public:
_label = NULL; _label = NULL;
} }
virtual ~Track_Point ( )
{
}
void void
draw ( int X, int Y, int W, int H ) draw ( int X, int Y, int W, int H )
{ {

View File

@ -228,7 +228,7 @@ public:
if ( Fl::event_state() & FL_CTRL && if ( Fl::event_state() & FL_CTRL &&
Fl::event_button() == 3 ) Fl::event_button() == 3 )
{ {
log_destroy(); // log_destroy();
redraw(); redraw();
_track->queue_delete( this ); _track->queue_delete( this );