Add locking for sequence widget drags.
This commit is contained in:
parent
98507e60bd
commit
6c9e2c8c07
|
@ -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. */
|
/** set position of widget on the timeline. */
|
||||||
void
|
void
|
||||||
Sequence_Widget::start ( nframes_t where )
|
Sequence_Widget::start ( nframes_t where )
|
||||||
|
|
|
@ -263,21 +263,8 @@ public:
|
||||||
|
|
||||||
// static void pushed ( Sequence_Widget *w ) { Sequence_Widget::_pushed = w; }
|
// static void pushed ( Sequence_Widget *w ) { Sequence_Widget::_pushed = w; }
|
||||||
|
|
||||||
void begin_drag ( const Drag &d )
|
void begin_drag ( const Drag &d );
|
||||||
{
|
void end_drag ( void );
|
||||||
_drag = new Drag( d );
|
|
||||||
_r = new Range( _range );
|
|
||||||
}
|
|
||||||
|
|
||||||
void end_drag ( void )
|
|
||||||
{
|
|
||||||
_range = *_r;
|
|
||||||
delete _r;
|
|
||||||
_r = &_range;
|
|
||||||
|
|
||||||
delete _drag;
|
|
||||||
_drag = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dispatch ( int m );
|
int dispatch ( int m );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue