diff --git a/Timeline/Sequence_Widget.C b/Timeline/Sequence_Widget.C index 35099b9..8dcd433 100644 --- a/Timeline/Sequence_Widget.C +++ b/Timeline/Sequence_Widget.C @@ -78,6 +78,32 @@ Sequence_Widget::set ( Log_Entry &e ) } +void +Sequence_Widget::begin_drag ( const Drag &d ) +{ + _drag = new Drag( d ); + _r = new Range( _range ); +} + +void +Sequence_Widget::end_drag ( void ) +{ + timeline->wrlock(); + + /* swap in the new value */ + _range = *_r; + + timeline->unlock(); + + /* TODO: perhaps trigger rebuffer here? */ + + delete _r; + _r = &_range; + + delete _drag; + _drag = NULL; +} + /** set position of widget on the timeline. */ void Sequence_Widget::start ( nframes_t where ) diff --git a/Timeline/Sequence_Widget.H b/Timeline/Sequence_Widget.H index 8a1fd1e..1fd193e 100644 --- a/Timeline/Sequence_Widget.H +++ b/Timeline/Sequence_Widget.H @@ -263,21 +263,8 @@ public: // static void pushed ( Sequence_Widget *w ) { Sequence_Widget::_pushed = w; } - void begin_drag ( const Drag &d ) - { - _drag = new Drag( d ); - _r = new Range( _range ); - } - - void end_drag ( void ) - { - _range = *_r; - delete _r; - _r = &_range; - - delete _drag; - _drag = NULL; - } + void begin_drag ( const Drag &d ); + void end_drag ( void ); int dispatch ( int m );