Prefer parameter_is_midi() API, fixes PolyKeyPressure
Previously MidiNotePressureAutomation was not assumed to be MIDI automation.
This commit is contained in:
parent
895b9c2051
commit
21df7279d2
@ -178,8 +178,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (
|
|||||||
auto_dropdown.AddMenuElem (MenuElem (_("Play"), sigc::bind (sigc::mem_fun(*this,
|
auto_dropdown.AddMenuElem (MenuElem (_("Play"), sigc::bind (sigc::mem_fun(*this,
|
||||||
&AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
|
&AutomationTimeAxisView::set_automation_state), (AutoState) Play)));
|
||||||
|
|
||||||
if (!(_parameter.type() >= MidiCCAutomation &&
|
if (!parameter_is_midi(_parameter.type ())) {
|
||||||
_parameter.type() <= MidiChannelPressureAutomation)) {
|
|
||||||
auto_dropdown.AddMenuElem (MenuElem (_("Write"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
|
auto_dropdown.AddMenuElem (MenuElem (_("Write"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Write)));
|
||||||
auto_dropdown.AddMenuElem (MenuElem (_("Touch"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
|
auto_dropdown.AddMenuElem (MenuElem (_("Touch"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Touch)));
|
||||||
auto_dropdown.AddMenuElem (MenuElem (_("Latch"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Latch)));
|
auto_dropdown.AddMenuElem (MenuElem (_("Latch"), sigc::bind (sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state), (AutoState) Latch)));
|
||||||
@ -619,7 +618,7 @@ AutomationTimeAxisView::hide_clicked ()
|
|||||||
string
|
string
|
||||||
AutomationTimeAxisView::automation_state_off_string () const
|
AutomationTimeAxisView::automation_state_off_string () const
|
||||||
{
|
{
|
||||||
if (_parameter.type() >= MidiCCAutomation && _parameter.type() <= MidiChannelPressureAutomation) {
|
if (parameter_is_midi(_parameter.type ())) {
|
||||||
return S_("Automation|Off");
|
return S_("Automation|Off");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -660,8 +659,7 @@ AutomationTimeAxisView::build_display_menu ()
|
|||||||
(AutoState) Play)));
|
(AutoState) Play)));
|
||||||
auto_play_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
auto_play_item = dynamic_cast<Gtk::CheckMenuItem*>(&as_items.back());
|
||||||
|
|
||||||
if (!(_parameter.type() >= MidiCCAutomation &&
|
if (!parameter_is_midi(_parameter.type ())) {
|
||||||
_parameter.type() <= MidiChannelPressureAutomation)) {
|
|
||||||
as_items.push_back (CheckMenuElem (_("Write"), sigc::bind (
|
as_items.push_back (CheckMenuElem (_("Write"), sigc::bind (
|
||||||
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
sigc::mem_fun(*this, &AutomationTimeAxisView::set_automation_state),
|
||||||
(AutoState) Write)));
|
(AutoState) Write)));
|
||||||
@ -970,11 +968,7 @@ AutomationTimeAxisView::propagate_time_selection () const
|
|||||||
/* MIDI automation is part of the MIDI region. It is always
|
/* MIDI automation is part of the MIDI region. It is always
|
||||||
* implicily selected with the parent, regardless of TAV selection
|
* implicily selected with the parent, regardless of TAV selection
|
||||||
*/
|
*/
|
||||||
if (_parameter.type() >= MidiCCAutomation &&
|
return parameter_is_midi(_parameter.type ());
|
||||||
_parameter.type() <= MidiChannelPressureAutomation) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user