Browse Source

More work on cleaning up undo system.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
f3d7abfe32
6 changed files with 22 additions and 4 deletions
  1. +5
    -0
      Region.H
  2. +4
    -1
      Tempo_Point.H
  3. +4
    -1
      Time_Point.H
  4. +3
    -1
      Track.C
  5. +5
    -0
      Track_Point.H
  6. +1
    -1
      Track_Widget.H

+ 5
- 0
Region.H 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); }




+ 4
- 1
Tempo_Point.H 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; }


+ 4
- 1
Time_Point.H 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; } */


+ 3
- 1
Track.C 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;


+ 5
- 0
Track_Point.H 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 )
{ {


+ 1
- 1
Track_Widget.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 );


Loading…
Cancel
Save