Adapt other classes to the new handle_widget_change() method.
This commit is contained in:
parent
4c75e2bd7d
commit
33c646109f
|
@ -359,8 +359,6 @@ Audio_Region::handle ( int m )
|
|||
|
||||
copied = false;
|
||||
|
||||
sequence()->handle_widget_change( _r->start, _r->length );
|
||||
|
||||
return 1;
|
||||
}
|
||||
case FL_DRAG:
|
||||
|
|
|
@ -149,9 +149,9 @@ Sequence::draw ( void )
|
|||
void
|
||||
Sequence::remove ( Sequence_Widget *r )
|
||||
{
|
||||
// Logger _log( this );
|
||||
|
||||
_widgets.remove( r );
|
||||
|
||||
handle_widget_change( r->start(), r->length() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -213,6 +213,8 @@ Sequence::add ( Sequence_Widget *r )
|
|||
_widgets.push_back( r );
|
||||
|
||||
sort();
|
||||
|
||||
handle_widget_change( r->start(), r->length() );
|
||||
}
|
||||
|
||||
static nframes_t
|
||||
|
|
|
@ -313,6 +313,8 @@ Sequence_Widget::handle ( int m )
|
|||
_log.release();
|
||||
}
|
||||
|
||||
sequence()->handle_widget_change( _r->start, _r->length );
|
||||
|
||||
fl_cursor( FL_CURSOR_HAND );
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -52,8 +52,7 @@ Tempo_Point::set ( Log_Entry &e )
|
|||
|
||||
}
|
||||
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
sequence()->handle_widget_change( start(), length() );
|
||||
|
||||
_make_label();
|
||||
}
|
||||
|
@ -62,7 +61,6 @@ Tempo_Point::set ( Log_Entry &e )
|
|||
Tempo_Point::Tempo_Point ( )
|
||||
{
|
||||
timeline->tempo_track->add( this );
|
||||
timeline->update_tempomap();
|
||||
}
|
||||
|
||||
Tempo_Point::Tempo_Point ( nframes_t when, float bpm )
|
||||
|
@ -72,7 +70,6 @@ Tempo_Point::Tempo_Point ( nframes_t when, float bpm )
|
|||
_make_label();
|
||||
|
||||
timeline->tempo_track->add( this );
|
||||
timeline->update_tempomap();
|
||||
|
||||
start( when );
|
||||
|
||||
|
@ -84,7 +81,6 @@ Tempo_Point::Tempo_Point ( nframes_t when, float bpm )
|
|||
Tempo_Point::~Tempo_Point ( )
|
||||
{
|
||||
timeline->tempo_track->remove( this );
|
||||
timeline->update_tempomap();
|
||||
log_destroy();
|
||||
}
|
||||
|
||||
|
@ -101,15 +97,7 @@ Tempo_Point::handle ( int m )
|
|||
return 0;
|
||||
}
|
||||
|
||||
int r = Sequence_Widget::handle( m );
|
||||
|
||||
if ( m == FL_RELEASE )
|
||||
{
|
||||
sequence()->sort();
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
}
|
||||
return r;
|
||||
return Sequence_Point::handle( m );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
|
||||
#include "Tempo_Sequence.H"
|
||||
|
||||
void
|
||||
Tempo_Sequence::handle_widget_change ( nframes_t, nframes_t )
|
||||
{
|
||||
sort();
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
}
|
||||
|
||||
int
|
||||
Tempo_Sequence::handle ( int m )
|
||||
{
|
||||
|
|
|
@ -40,6 +40,7 @@ public:
|
|||
// box( FL_DOWN_BOX );
|
||||
}
|
||||
|
||||
void handle_widget_change ( nframes_t start, nframes_t length );
|
||||
int handle ( int m );
|
||||
|
||||
};
|
||||
|
|
|
@ -54,8 +54,7 @@ Time_Point::set ( Log_Entry &e )
|
|||
|
||||
}
|
||||
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
sequence()->handle_widget_change( start(), length() );
|
||||
|
||||
_make_label();
|
||||
}
|
||||
|
@ -64,7 +63,6 @@ Time_Point::set ( Log_Entry &e )
|
|||
Time_Point::Time_Point ( ) : _time( 4, 4 )
|
||||
{
|
||||
timeline->time_track->add( this );
|
||||
timeline->update_tempomap();
|
||||
}
|
||||
|
||||
Time_Point::Time_Point ( nframes_t when, int bpb, int note ) : _time( bpb, note )
|
||||
|
@ -72,7 +70,6 @@ Time_Point::Time_Point ( nframes_t when, int bpb, int note ) : _time( bpb, note
|
|||
_make_label();
|
||||
|
||||
timeline->time_track->add( this );
|
||||
timeline->update_tempomap();
|
||||
|
||||
start( when );
|
||||
|
||||
|
@ -83,7 +80,6 @@ Time_Point::Time_Point ( const Time_Point &rhs ) : Sequence_Point( rhs )
|
|||
{
|
||||
_time = rhs._time;
|
||||
|
||||
timeline->update_tempomap();
|
||||
log_create();
|
||||
|
||||
}
|
||||
|
@ -91,7 +87,6 @@ Time_Point::Time_Point ( const Time_Point &rhs ) : Sequence_Point( rhs )
|
|||
Time_Point::~Time_Point ( )
|
||||
{
|
||||
timeline->time_track->remove( this );
|
||||
timeline->update_tempomap();
|
||||
|
||||
log_destroy();
|
||||
}
|
||||
|
@ -114,16 +109,7 @@ Time_Point::handle ( int m )
|
|||
|
||||
}
|
||||
|
||||
int r = Sequence_Widget::handle( m );
|
||||
|
||||
if ( m == FL_RELEASE )
|
||||
{
|
||||
sequence()->sort();
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
}
|
||||
return r;
|
||||
|
||||
return Sequence_Point::handle( m );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
|
||||
#include "Time_Sequence.H"
|
||||
|
||||
void
|
||||
Time_Sequence::handle_widget_change ( nframes_t, nframes_t )
|
||||
{
|
||||
sort();
|
||||
timeline->update_tempomap();
|
||||
timeline->redraw();
|
||||
}
|
||||
|
||||
int
|
||||
Time_Sequence::handle ( int m )
|
||||
{
|
||||
|
|
|
@ -63,5 +63,6 @@ public:
|
|||
add( new Time_Point( when, bpb, note ) );
|
||||
}
|
||||
|
||||
void handle_widget_change ( nframes_t start, nframes_t length );
|
||||
int handle ( int m );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue