Don't show meter-type menu for MIDI-only meters
This commit is contained in:
parent
730e09ce65
commit
c5e97ea21b
@ -844,6 +844,12 @@ GainMeterBase::gain_automation_state_changed ()
|
||||
}
|
||||
}
|
||||
|
||||
const ChanCount
|
||||
GainMeterBase::meter_channels() const
|
||||
{
|
||||
if (_meter) { return _meter->input_streams(); }
|
||||
else { return ChanCount(); }
|
||||
}
|
||||
void
|
||||
GainMeterBase::update_meters()
|
||||
{
|
||||
|
@ -76,6 +76,8 @@ class GainMeterBase : virtual public sigc::trackable, ARDOUR::SessionHandlePtr
|
||||
void update_gain_sensitive ();
|
||||
void update_meters ();
|
||||
|
||||
const ARDOUR::ChanCount meter_channels () const;
|
||||
|
||||
void effective_gain_display ();
|
||||
void set_width (Width, int len=0);
|
||||
void set_meter_strip_name (const char * name);
|
||||
|
@ -782,7 +782,9 @@ bool
|
||||
MeterStrip::level_meter_button_release (GdkEventButton* ev)
|
||||
{
|
||||
if (ev->button == 3) {
|
||||
popup_level_meter_menu (ev);
|
||||
if (_route && _route->shared_peak_meter()->input_streams ().n_audio() > 0) {
|
||||
popup_level_meter_menu (ev);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -2190,6 +2190,12 @@ MixerStrip::popup_level_meter_menu (GdkEventButton* ev)
|
||||
add_level_meter_item_point (items, group, _("Output"), MeterOutput);
|
||||
add_level_meter_item_point (items, group, _("Custom"), MeterCustom);
|
||||
|
||||
if (gpm.meter_channels().n_audio() == 0) {
|
||||
m->popup (ev->button, ev->time);
|
||||
_suspend_menu_callbacks = false;
|
||||
return;
|
||||
}
|
||||
|
||||
RadioMenuItem::Group tgroup;
|
||||
items.push_back (SeparatorElem());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user