* Allow choice of interpolation mode only for Linear Controls
git-svn-id: svn://localhost/ardour2/branches/3.0@4453 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3705a2d630
commit
8048f0309f
@ -532,8 +532,6 @@ AutomationTimeAxisView::build_display_menu ()
|
|||||||
|
|
||||||
/* mode menu */
|
/* mode menu */
|
||||||
|
|
||||||
// To be deleted: MIDI events should always be discrete, so no choice for the user here.
|
|
||||||
/*
|
|
||||||
if ( EventTypeMap::instance().is_midi_parameter(_control->parameter()) ) {
|
if ( EventTypeMap::instance().is_midi_parameter(_control->parameter()) ) {
|
||||||
|
|
||||||
Menu* auto_mode_menu = manage (new Menu);
|
Menu* auto_mode_menu = manage (new Menu);
|
||||||
@ -541,22 +539,24 @@ AutomationTimeAxisView::build_display_menu ()
|
|||||||
MenuList& am_items = auto_mode_menu->items();
|
MenuList& am_items = auto_mode_menu->items();
|
||||||
|
|
||||||
RadioMenuItem::Group group;
|
RadioMenuItem::Group group;
|
||||||
|
|
||||||
am_items.push_back (RadioMenuElem (group, _("Discrete"), bind (
|
am_items.push_back (RadioMenuElem (group, _("Discrete"), bind (
|
||||||
mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
||||||
AutomationList::Discrete)));
|
AutomationList::Discrete)));
|
||||||
mode_discrete_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
mode_discrete_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
||||||
mode_discrete_item->set_active(_control->list()->interpolation() == AutomationList::Discrete);
|
mode_discrete_item->set_active(_control->list()->interpolation() == AutomationList::Discrete);
|
||||||
|
|
||||||
am_items.push_back (RadioMenuElem (group, _("Line"), bind (
|
// For discrete types we dont allow the linear option since it makes no sense for those Controls
|
||||||
mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
if (EventTypeMap::instance().interpolation_of(_control->parameter()) == Evoral::ControlList::Linear) {
|
||||||
AutomationList::Linear)));
|
am_items.push_back (RadioMenuElem (group, _("Line"), bind (
|
||||||
mode_line_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
|
||||||
mode_line_item->set_active(_control->list()->interpolation() == AutomationList::Linear);
|
AutomationList::Linear)));
|
||||||
|
mode_line_item = dynamic_cast<CheckMenuItem*>(&am_items.back());
|
||||||
|
mode_line_item->set_active(_control->list()->interpolation() == AutomationList::Linear);
|
||||||
|
}
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Mode"), *auto_mode_menu));
|
items.push_back (MenuElem (_("Mode"), *auto_mode_menu));
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
/* make sure the automation menu state is correct */
|
/* make sure the automation menu state is correct */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user