GenericUI: better popup placement for automation mode

This commit is contained in:
Julien "_FrnchFrgg_" RIVAUD 2016-08-08 16:33:29 +02:00
parent a51cd8689f
commit 653df3ca4f

View File

@ -940,6 +940,7 @@ GenericPluginUI::astate_clicked (ControlUI* cui)
if (automation_menu == 0) {
automation_menu = manage (new Menu);
automation_menu->set_name ("ArdourContextMenu");
automation_menu->set_reserve_toggle_size(false);
}
MenuList& items (automation_menu->items());
@ -954,7 +955,9 @@ GenericPluginUI::astate_clicked (ControlUI* cui)
items.push_back (MenuElem (_("Touch"),
sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::set_automation_state), (AutoState) Touch, cui)));
automation_menu->popup (1, gtk_get_current_event_time());
automation_menu->popup (
boost::bind (&Gtkmm2ext::position_menu_anchored, automation_menu, &cui->automate_button, "", _1, _2, _3),
1, gtk_get_current_event_time());
}
void