Browse Source

Allow the removal of annotation sequences via a context menu.

tags/non-daw-v1.1.0
Jonathan Moore Liles 15 years ago
parent
commit
80f24ba2d1
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      Timeline/Annotation_Sequence.H

+ 24
- 0
Timeline/Annotation_Sequence.H View File

@@ -104,6 +104,8 @@ public:
{
case FL_PUSH:
{
Logger log( this );

if ( Fl::event_button1() )
{
add( new Annotation_Point( this, x_to_offset( Fl::event_x() ), "mark" ) );
@@ -124,6 +126,28 @@ public:
return 1;

}
else if ( Fl::event_button3() && ! ( Fl::event_state() & ( FL_ALT | FL_SHIFT | FL_CTRL ) ) )
{

Fl_Menu_Item menu[] =
{
{ "Remove" },
{ 0 }
};

const Fl_Menu_Item *r = menu->popup( Fl::event_x(), Fl::event_y(), "Annotation Sequence" );

if ( r )
{
if ( r == &menu[ 0 ] )
{
Fl::delete_widget( this );
}

}

return 1;
}
break;
}
default:


Loading…
Cancel
Save