mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
fix some issues with context menu management
git-svn-id: svn://localhost/ardour2/branches/3.0@6456 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
6d3dfd0ded
commit
27eb926d3f
3 changed files with 15 additions and 10 deletions
|
|
@ -322,9 +322,7 @@ MidiTimeAxisView::build_def_channel_menu ()
|
|||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
if (default_channel_menu == 0) {
|
||||
default_channel_menu = manage (new Menu ());
|
||||
}
|
||||
default_channel_menu = manage (new Menu ());
|
||||
|
||||
uint8_t defchn = midi_track()->default_channel();
|
||||
MenuList& def_channel_items = default_channel_menu->items();
|
||||
|
|
|
|||
|
|
@ -427,26 +427,31 @@ RouteTimeAxisView::build_automation_action_menu ()
|
|||
automation_items.push_back (MenuElem (_("Hide all automation"),
|
||||
sigc::mem_fun(*this, &RouteTimeAxisView::hide_all_automation)));
|
||||
|
||||
if (subplugin_menu.get_attach_widget())
|
||||
subplugin_menu.detach();
|
||||
if (subplugin_menu.gobj()) {
|
||||
/* this will break if the underlying GTK menu has never been set up, hence
|
||||
the if() above. we have to do this
|
||||
*/
|
||||
if (subplugin_menu.get_attach_widget()) {
|
||||
subplugin_menu.detach();
|
||||
}
|
||||
|
||||
automation_items.push_back (MenuElem (_("Plugins"), subplugin_menu));
|
||||
automation_items.push_back (MenuElem (_("Plugins..."), subplugin_menu));
|
||||
} else {
|
||||
automation_items.push_back (MenuElem (_("Plugins")));
|
||||
}
|
||||
automation_items.back().set_sensitive (!subplugin_menu.items().empty());
|
||||
|
||||
map<Evoral::Parameter, RouteAutomationNode*>::iterator i;
|
||||
|
||||
for (i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
|
||||
|
||||
automation_items.push_back (SeparatorElem());
|
||||
|
||||
delete i->second->menu_item;
|
||||
|
||||
automation_items.push_back(CheckMenuElem (_route->describe_parameter(i->second->param),
|
||||
sigc::bind (sigc::mem_fun(*this, &RouteTimeAxisView::toggle_automation_track), i->second->param)));
|
||||
|
||||
i->second->menu_item = static_cast<Gtk::CheckMenuItem*>(&automation_items.back());
|
||||
|
||||
i->second->menu_item->set_active(show_automation(i->second->param));
|
||||
//i->second->menu_item->set_active(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -664,6 +664,8 @@ TimeAxisView::build_display_menu ()
|
|||
{
|
||||
using namespace Menu_Helpers;
|
||||
|
||||
delete display_menu;
|
||||
|
||||
display_menu = new Menu;
|
||||
display_menu->set_name ("ArdourContextMenu");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue