make it possible to drop a group from a VCA
This commit is contained in:
parent
196bdf8394
commit
aeae859c46
@ -356,6 +356,9 @@ GroupTabs::get_menu (RouteGroup* g, bool in_tab_area)
|
|||||||
|
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
|
|
||||||
|
if (g->has_control_master()) {
|
||||||
|
items.push_back (MenuElem (_("Drop Group from VCA..."), sigc::bind (sigc::mem_fun (*this, &GroupTabs::unassign_group_to_master), g->group_master_number(), g)));
|
||||||
|
} else {
|
||||||
vca_menu = manage (new Menu);
|
vca_menu = manage (new Menu);
|
||||||
MenuList& f (vca_menu->items());
|
MenuList& f (vca_menu->items());
|
||||||
f.push_back (MenuElem ("New", sigc::bind (sigc::mem_fun (*this, &GroupTabs::assign_group_to_master), 0, g, true)));
|
f.push_back (MenuElem ("New", sigc::bind (sigc::mem_fun (*this, &GroupTabs::assign_group_to_master), 0, g, true)));
|
||||||
@ -364,7 +367,7 @@ GroupTabs::get_menu (RouteGroup* g, bool in_tab_area)
|
|||||||
f.push_back (MenuElem ((*v)->name().empty() ? string_compose ("VCA %1", (*v)->number()) : (*v)->name(), sigc::bind (sigc::mem_fun (*this, &GroupTabs::assign_group_to_master), (*v)->number(), g, true)));
|
f.push_back (MenuElem ((*v)->name().empty() ? string_compose ("VCA %1", (*v)->number()) : (*v)->name(), sigc::bind (sigc::mem_fun (*this, &GroupTabs::assign_group_to_master), (*v)->number(), g, true)));
|
||||||
}
|
}
|
||||||
items.push_back (MenuElem (_("Assign Group to VCA..."), *vca_menu));
|
items.push_back (MenuElem (_("Assign Group to VCA..."), *vca_menu));
|
||||||
|
}
|
||||||
|
|
||||||
items.push_back (SeparatorElem());
|
items.push_back (SeparatorElem());
|
||||||
|
|
||||||
@ -466,6 +469,26 @@ GroupTabs::assign_group_to_master (uint32_t which, RouteGroup* group, bool renam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
GroupTabs::unassign_group_to_master (uint32_t which, RouteGroup* group) const
|
||||||
|
{
|
||||||
|
if (!_session || !group) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boost::shared_ptr<VCA> master = _session->vca_manager().vca_by_number (which);
|
||||||
|
|
||||||
|
if (!master) {
|
||||||
|
/* should never happen; if it does, basically something deeply
|
||||||
|
odd happened, no reason to tell user because there's no
|
||||||
|
sensible explanation.
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
group->unassign_master (master);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GroupTabs::assign_some_to_master (uint32_t which, RouteList rl)
|
GroupTabs::assign_some_to_master (uint32_t which, RouteList rl)
|
||||||
{
|
{
|
||||||
|
@ -128,6 +128,7 @@ private:
|
|||||||
void route_removed_from_route_group (ARDOUR::RouteGroup *, boost::weak_ptr<ARDOUR::Route>);
|
void route_removed_from_route_group (ARDOUR::RouteGroup *, boost::weak_ptr<ARDOUR::Route>);
|
||||||
|
|
||||||
void assign_group_to_master (uint32_t which, ARDOUR::RouteGroup*, bool rename_master) const;
|
void assign_group_to_master (uint32_t which, ARDOUR::RouteGroup*, bool rename_master) const;
|
||||||
|
void unassign_group_to_master (uint32_t which, ARDOUR::RouteGroup*) const;
|
||||||
void assign_selection_to_master (uint32_t which);
|
void assign_selection_to_master (uint32_t which);
|
||||||
void assign_recenabled_to_master (uint32_t which);
|
void assign_recenabled_to_master (uint32_t which);
|
||||||
void assign_soloed_to_master (uint32_t which);
|
void assign_soloed_to_master (uint32_t which);
|
||||||
|
Loading…
Reference in New Issue
Block a user