Mixer: disable context menu on fader view meter indicators.

pull/43/head
Jonathan Moore Liles 2013-03-18 17:20:46 -07:00
parent d2668943e5
commit b855493014
3 changed files with 9 additions and 0 deletions

View File

@ -50,6 +50,7 @@ Meter_Indicator_Module::Meter_Indicator_Module ( bool is_default )
box( FL_FLAT_BOX );
color( FL_BACKGROUND_COLOR );
_disable_context_menu = false;
_pad = true;
control_value = 0;
@ -209,6 +210,9 @@ Meter_Indicator_Module::handle ( int m )
{
case FL_PUSH:
{
if ( Fl::event_button3() && _disable_context_menu )
return 0;
if ( Fl::event_button1() )
{
/* don't let Module::handle eat our click */

View File

@ -37,8 +37,12 @@ class Meter_Indicator_Module : public Module
volatile float *control_value;
bool _disable_context_menu;
public:
void disable_context_menu ( bool b ) { _disable_context_menu = b; }
void handle_control_changed ( Port *p );
Meter_Indicator_Module ( bool is_default = false );

View File

@ -451,6 +451,7 @@ Mixer_Strip::init ( )
o->size( 33, 100 );
}
{ Meter_Indicator_Module *o = meter_indicator = new Meter_Indicator_Module( true );
o->disable_context_menu( true );
o->pad( false );
o->size( 38, 100 );
Fl_Group::current()->resizable(o);