Make duplicate work for selection.
This commit is contained in:
parent
8533f49d87
commit
a0c6c794fa
8
Region.C
8
Region.C
|
@ -353,12 +353,14 @@ Region::handle ( int m )
|
|||
else
|
||||
return 0;
|
||||
|
||||
ret = Track_Widget::handle( m );
|
||||
|
||||
if ( Fl::event_state() & FL_CTRL )
|
||||
{
|
||||
if ( ! copied )
|
||||
if ( _drag->state == 0 )
|
||||
{
|
||||
_track->add( new Region( *this ) );
|
||||
copied = true;
|
||||
_drag->state = 1;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +382,7 @@ Region::handle ( int m )
|
|||
}
|
||||
}
|
||||
|
||||
ret = Track_Widget::handle( m );
|
||||
// ret = Track_Widget::handle( m );
|
||||
return ret | 1;
|
||||
default:
|
||||
return Track_Widget::handle( m );
|
||||
|
|
|
@ -50,8 +50,9 @@ protected:
|
|||
/* mouse coords at start of drag */
|
||||
int x;
|
||||
int y;
|
||||
int state;
|
||||
|
||||
Drag( int X, int Y ) : x( X ), y( Y ) {}
|
||||
Drag( int X, int Y ) : x( X ), y( Y ) { state = 0; }
|
||||
};
|
||||
|
||||
Drag *_drag;
|
||||
|
|
Loading…
Reference in New Issue