Mixer: Make insert-before work for meter indicator module.

This commit is contained in:
Jonathan Moore Liles 2010-01-24 19:47:10 -06:00
parent 95708a2371
commit 89a833a33d
2 changed files with 34 additions and 2 deletions

View File

@ -38,6 +38,8 @@
const float CONTROL_UPDATE_FREQ = 0.1f; const float CONTROL_UPDATE_FREQ = 0.1f;
#include "FL/test_press.H"
@ -198,7 +200,20 @@ Meter_Indicator_Module::connect_to ( Port *p )
int int
Meter_Indicator_Module::handle ( int m ) Meter_Indicator_Module::handle ( int m )
{ {
return Fl_Group::handle( m ); switch ( m )
{
case FL_PUSH:
{
if ( test_press( FL_BUTTON1 ) )
{
/* don't let Module::handle eat our click */
return Fl_Group::handle( m );
}
return Module::handle( m );
}
}
return Module::handle( m );
} }

View File

@ -24,6 +24,7 @@
#include <FL/Fl_Scalepack.H> #include <FL/Fl_Scalepack.H>
#include "JACK/Port.H" #include "JACK/Port.H"
#include <math.h> #include <math.h>
#include "FL/test_press.H"
@ -70,6 +71,8 @@ Meter_Module::~Meter_Module ( )
log_destroy(); log_destroy();
} }
void void
Meter_Module::update_cb ( void *v ) Meter_Module::update_cb ( void *v )
{ {
@ -152,8 +155,22 @@ Meter_Module::configure_inputs ( int n )
int int
Meter_Module::handle ( int m ) Meter_Module::handle ( int m )
{ {
return Fl_Group::handle( m ); switch ( m )
{
case FL_PUSH:
{
if ( test_press( FL_BUTTON1 ) )
{
/* don't let Module::handle eat our click */
return Fl_Group::handle( m );
}
return Module::handle( m );
}
}
return Module::handle( m );
} }
static float static float