+
+ } else {
+
+ Menu* auto_mode_menu = manage (new Menu);
+ auto_mode_menu->set_name ("ArdourContextMenu");
+ MenuList& am_items = auto_mode_menu->items();
+ bool have_options = false;
+
+ RadioMenuItem::Group group;
+
+ am_items.push_back (RadioMenuElem (group, _("Linear"), sigc::bind (
+ sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
+ AutomationList::Linear)));
+ mode_line_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
+
+ if (_control->desc().logarithmic) {
+ am_items.push_back (RadioMenuElem (group, _("Logarithmic"), sigc::bind (
+ sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
+ AutomationList::Logarithmic)));
+ mode_log_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
+ have_options = true;
+ } else {
+ mode_log_item = 0;
+ }
+
+ if (_line->get_uses_gain_mapping () && !_control->desc().logarithmic) {
+ am_items.push_back (RadioMenuElem (group, _("Exponential"), sigc::bind (
+ sigc::mem_fun(*this, &AutomationTimeAxisView::set_interpolation),
+ AutomationList::Exponential)));
+ mode_exp_item = dynamic_cast<Gtk::CheckMenuItem*>(&am_items.back());
+ have_options = true;
+ } else {
+ mode_exp_item = 0;
+ }
+
+ if (have_options) {
+ items.push_back (MenuElem (_("Interpolation"), *auto_mode_menu));
+ } else {
+ mode_line_item = 0;
+ delete auto_mode_menu;
+ auto_mode_menu = 0;
+ }