diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-13 20:57:13 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-13 20:57:13 +0000 |
commit | 8fc47ac2aeea87bc24a9798c3880441296c55804 (patch) | |
tree | 7e80e9df871b292d3dbabc558a40c68c64a9e6e5 | |
parent | c3c8530ffc2b554df6fc79036db117d8fd5ddb54 (diff) |
make sure Edit property of RouteGroup is enabled when doing a few different playlist and other ops and applying them to the group
git-svn-id: svn://localhost/ardour2/branches/3.0@9509 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 4ed5a9584c..8871b7bbe1 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -1068,7 +1068,7 @@ RouteTimeAxisView::use_copy_playlist (bool prompt, vector<boost::shared_ptr<Play name = pl->name(); - if (route_group() && route_group()->is_active()) { + if (route_group() && route_group()->is_active() && route_group()->enabled_property (ARDOUR::Properties::edit.property_id)) { name = resolve_new_group_playlist_name(name, playlists_before_op); } @@ -1123,7 +1123,7 @@ RouteTimeAxisView::use_new_playlist (bool prompt, vector<boost::shared_ptr<Playl name = pl->name(); - if (route_group() && route_group()->is_active()) { + if (route_group() && route_group()->is_active() && route_group()->enabled_property (ARDOUR::Properties::edit.property_id)) { name = resolve_new_group_playlist_name(name,playlists_before_op); } @@ -1506,7 +1506,7 @@ RouteTimeAxisView::build_playlist_menu () playlist_items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &RouteTimeAxisView::rename_current_playlist))); playlist_items.push_back (SeparatorElem()); - if (!route_group() || !route_group()->is_active()) { + if (!route_group() || !route_group()->is_active() || !route_group()->enabled_property (ARDOUR::Properties::edit.property_id)) { playlist_items.push_back (MenuElem (_("New..."), sigc::bind(sigc::mem_fun(_editor, &PublicEditor::new_playlists), this))); playlist_items.push_back (MenuElem (_("New Copy..."), sigc::bind(sigc::mem_fun(_editor, &PublicEditor::copy_playlists), this))); @@ -1550,8 +1550,10 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist> } track()->use_playlist (apl); - if (route_group() && route_group()->is_active()) { - std::string group_string = "."+route_group()->name()+"."; + RouteGroup* rg = route_group(); + + if (rg && rg->is_active() && rg->enabled_property (ARDOUR::Properties::edit.property_id)) { + std::string group_string = "." + rg->name() + "."; std::string take_name = apl->name(); std::string::size_type idx = take_name.find(group_string); @@ -1561,7 +1563,7 @@ RouteTimeAxisView::use_playlist (RadioMenuItem *item, boost::weak_ptr<Playlist> take_name = take_name.substr(idx + group_string.length()); // find the bit containing the take number / name - boost::shared_ptr<RouteList> rl (route_group()->route_list()); + boost::shared_ptr<RouteList> rl (rg->route_list()); for (RouteList::const_iterator i = rl->begin(); i != rl->end(); ++i) { if ( (*i) == this->route()) { |