Mixer: disable context menu on fader view meter indicators.
This commit is contained in:
parent
d2668943e5
commit
b855493014
|
@ -50,6 +50,7 @@ Meter_Indicator_Module::Meter_Indicator_Module ( bool is_default )
|
||||||
box( FL_FLAT_BOX );
|
box( FL_FLAT_BOX );
|
||||||
color( FL_BACKGROUND_COLOR );
|
color( FL_BACKGROUND_COLOR );
|
||||||
|
|
||||||
|
_disable_context_menu = false;
|
||||||
_pad = true;
|
_pad = true;
|
||||||
control_value = 0;
|
control_value = 0;
|
||||||
|
|
||||||
|
@ -209,6 +210,9 @@ Meter_Indicator_Module::handle ( int m )
|
||||||
{
|
{
|
||||||
case FL_PUSH:
|
case FL_PUSH:
|
||||||
{
|
{
|
||||||
|
if ( Fl::event_button3() && _disable_context_menu )
|
||||||
|
return 0;
|
||||||
|
|
||||||
if ( Fl::event_button1() )
|
if ( Fl::event_button1() )
|
||||||
{
|
{
|
||||||
/* don't let Module::handle eat our click */
|
/* don't let Module::handle eat our click */
|
||||||
|
|
|
@ -37,8 +37,12 @@ class Meter_Indicator_Module : public Module
|
||||||
|
|
||||||
volatile float *control_value;
|
volatile float *control_value;
|
||||||
|
|
||||||
|
bool _disable_context_menu;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
void disable_context_menu ( bool b ) { _disable_context_menu = b; }
|
||||||
|
|
||||||
void handle_control_changed ( Port *p );
|
void handle_control_changed ( Port *p );
|
||||||
|
|
||||||
Meter_Indicator_Module ( bool is_default = false );
|
Meter_Indicator_Module ( bool is_default = false );
|
||||||
|
|
|
@ -451,6 +451,7 @@ Mixer_Strip::init ( )
|
||||||
o->size( 33, 100 );
|
o->size( 33, 100 );
|
||||||
}
|
}
|
||||||
{ Meter_Indicator_Module *o = meter_indicator = new Meter_Indicator_Module( true );
|
{ Meter_Indicator_Module *o = meter_indicator = new Meter_Indicator_Module( true );
|
||||||
|
o->disable_context_menu( true );
|
||||||
o->pad( false );
|
o->pad( false );
|
||||||
o->size( 38, 100 );
|
o->size( 38, 100 );
|
||||||
Fl_Group::current()->resizable(o);
|
Fl_Group::current()->resizable(o);
|
||||||
|
|
Loading…
Reference in New Issue