diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-03 19:34:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-03 19:34:07 +0000 |
commit | 52167705ef9e3bd65c52a99d0837d5325049ff44 (patch) | |
tree | f6b753220476349d7594a7f3815ca98a3853a748 /gtk2_ardour/group_tabs.cc | |
parent | 7053f0922e8686bc49d888dc7a5299d3feed30d0 (diff) |
expose operation to remove subgroup
git-svn-id: svn://localhost/ardour2/branches/3.0@13762 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/group_tabs.cc')
-rw-r--r-- | gtk2_ardour/group_tabs.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/group_tabs.cc b/gtk2_ardour/group_tabs.cc index d53b905846..1332d4ba10 100644 --- a/gtk2_ardour/group_tabs.cc +++ b/gtk2_ardour/group_tabs.cc @@ -319,7 +319,11 @@ GroupTabs::get_menu (RouteGroup* g) items.push_back (MenuElem (_("Collect Group"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::collect), g))); items.push_back (MenuElem (_("Remove Group"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::remove_group), g))); items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Add New Subgroup Bus"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::subgroup), g, false, PreFader))); + if (g->has_subgroup()) { + items.push_back (MenuElem (_("Remove Subgroup Bus"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::un_subgroup), g))); + } else { + items.push_back (MenuElem (_("Add New Subgroup Bus"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::subgroup), g, false, PreFader))); + } items.push_back (MenuElem (_("Add New Aux Bus (pre-fader)"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::subgroup), g, true, PreFader))); items.push_back (MenuElem (_("Add New Aux Bus (post-fader)"), sigc::bind (sigc::mem_fun (*this, &GroupTabs::subgroup), g, true, PostFader))); } @@ -434,6 +438,12 @@ GroupTabs::subgroup (RouteGroup* g, bool aux, Placement placement) g->make_subgroup (aux, placement); } +void +GroupTabs::un_subgroup (RouteGroup* g) +{ + g->destroy_subgroup (); +} + struct CollectSorter { CollectSorter (RouteSortOrderKey key) : _key (key) {} |