Consolidate internal bus checks (2/2)
This commit is contained in:
parent
3de600625f
commit
9cc966120c
@ -99,12 +99,10 @@ DuplicateRouteDialog::restart (Session* s)
|
||||
|
||||
if (std::dynamic_pointer_cast<Track> (r)) {
|
||||
ntracks++;
|
||||
} else {
|
||||
if (!r->is_master() && !r->is_monitor()) {
|
||||
} else if (!r->is_main_bus()) {
|
||||
nbusses++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ntracks == 0 && nbusses == 0) {
|
||||
std::cerr << "You can't do this\n";
|
||||
@ -185,7 +183,7 @@ DuplicateRouteDialog::on_response (int response)
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*s)->is_master() || (*s)->is_monitor()) {
|
||||
if ((*s)->is_main_bus ()) {
|
||||
/* no option to duplicate these */
|
||||
continue;
|
||||
}
|
||||
|
@ -8299,7 +8299,7 @@ Editor::_remove_tracks ()
|
||||
}
|
||||
routes.push_back (rtv->route());
|
||||
|
||||
if (rtv->route()->is_master() || rtv->route()->is_monitor()) {
|
||||
if (rtv->route()->is_singleton ()) {
|
||||
special_bus = true;
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ PortExportChannelSelector::fill_route_list ()
|
||||
routes.sort (Stripable::Sorter ());
|
||||
|
||||
for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
|
||||
if ((*it)->is_master () || (*it)->is_monitor ()) {
|
||||
if ((*it)->is_main_bus ()) {
|
||||
continue;
|
||||
}
|
||||
if ((*it)->output()->n_ports ().n_audio () > 0) {
|
||||
@ -838,7 +838,7 @@ TrackExportChannelSelector::fill_list()
|
||||
for (RouteList::iterator it = routes.begin(); it != routes.end(); ++it) {
|
||||
if (!std::dynamic_pointer_cast<Track>(*it)) {
|
||||
// not a track, must be a bus
|
||||
if ((*it)->is_master () || (*it)->is_monitor ()) {
|
||||
if ((*it)->is_main_bus ()) {
|
||||
continue;
|
||||
}
|
||||
if (!(*it)->active ()) {
|
||||
|
@ -1060,7 +1060,7 @@ FoldbackStrip::create_selected_sends (ARDOUR::Placement p, bool)
|
||||
_session->get_stripables (*slist, fl);
|
||||
|
||||
for (StripableList::iterator i = (*slist).begin (); i != (*slist).end (); ++i) {
|
||||
if ((*i)->is_selected () && !(*i)->is_master () && !(*i)->is_monitor ()) {
|
||||
if ((*i)->is_selected () && !(*i)->is_main_bus ()) {
|
||||
std::shared_ptr<Route> rt = std::dynamic_pointer_cast<Route> (*i);
|
||||
if (rt) {
|
||||
rt->add_foldback_send (_route, p == PostFader);
|
||||
|
@ -621,7 +621,7 @@ IOPluginWindow::IOButton::button_press (GdkEventButton* ev)
|
||||
if (_pre) {
|
||||
/* suggest connecting output of io-plugins running before process to route inputs */
|
||||
for (auto const& i : copy) {
|
||||
if (i->is_foldbackbus () || i->is_monitor ()) {
|
||||
if (i->is_foldbackbus () || i->is_monitor () || i->is_surround_master ()) {
|
||||
continue;
|
||||
}
|
||||
maybe_add_bundle_to_menu (i->input ()->bundle ());
|
||||
|
@ -536,6 +536,9 @@ Meterbridge::add_strips (RouteList& routes)
|
||||
if (route->is_monitor()) {
|
||||
continue;
|
||||
}
|
||||
if (route->is_surround_master()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
strip = new MeterStrip (_session, route);
|
||||
strips.push_back (MeterBridgeStrip(strip));
|
||||
|
@ -70,7 +70,7 @@ MixerGroupTabs::compute_tabs () const
|
||||
continue;
|
||||
}
|
||||
|
||||
if (s->route()->is_master() || s->route()->is_monitor() || !s->marked_for_display()) {
|
||||
if (s->route()->is_main_bus () || !s->marked_for_display()) {
|
||||
continue;
|
||||
}
|
||||
#ifdef MIXBUS
|
||||
@ -172,7 +172,7 @@ MixerGroupTabs::routes_for_tab (Tab const * t) const
|
||||
continue;
|
||||
}
|
||||
|
||||
if (s->route()->is_master() || s->route()->is_monitor() || !s->marked_for_display()) {
|
||||
if (s->route()->is_main_bus () || !s->marked_for_display()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -712,7 +712,7 @@ MixerStrip::set_route (std::shared_ptr<Route> rt)
|
||||
|
||||
/* non-master bus */
|
||||
|
||||
if (!_route->is_master()) {
|
||||
if (!_route->is_main_bus ()) {
|
||||
if (ARDOUR::Profile->get_mixbus()) {
|
||||
rec_mon_table.attach (*show_sends_button, 0, 3, 0, 2);
|
||||
} else {
|
||||
@ -1098,7 +1098,7 @@ MixerStrip::build_route_ops_menu ()
|
||||
items.push_back (SeparatorElem());
|
||||
}
|
||||
|
||||
if (!_route->is_master()
|
||||
if (!_route->is_singleton ()
|
||||
#ifdef MIXBUS
|
||||
&& !_route->mixbus()
|
||||
#endif
|
||||
@ -1118,7 +1118,7 @@ MixerStrip::build_route_ops_menu ()
|
||||
items.push_back (SeparatorElem());
|
||||
}
|
||||
|
||||
if ((!_route->is_master() || !active)
|
||||
if ((!_route->is_singleton () || !active)
|
||||
#ifdef MIXBUS
|
||||
&& !_route->mixbus()
|
||||
#endif
|
||||
@ -1191,7 +1191,7 @@ MixerStrip::build_route_ops_menu ()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!_route->is_master()) {
|
||||
if (!_route->is_singleton ()) {
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Duplicate..."), sigc::mem_fun (*this, &RouteUI::duplicate_selected_routes)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
@ -1467,7 +1467,7 @@ Mixer_UI::set_all_strips_visibility (bool yn)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
if (strip->route()->is_singleton()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1499,7 +1499,7 @@ Mixer_UI::set_all_audio_midi_visibility (int tracks, bool yn)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strip->route()->is_master() || strip->route()->is_monitor()) {
|
||||
if (strip->route()->is_singleton()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1770,7 +1770,7 @@ Mixer_UI::redisplay_track_list ()
|
||||
|
||||
} else {
|
||||
|
||||
if (stripable->is_master() || stripable->is_monitor()) {
|
||||
if (stripable->is_singleton()) {
|
||||
/* do nothing, these cannot be hidden */
|
||||
} else {
|
||||
if (strip->packed()) {
|
||||
@ -2047,6 +2047,9 @@ Mixer_UI::stripable_property_changed (const PropertyChange& what_changed, std::w
|
||||
}
|
||||
}
|
||||
|
||||
if (s->is_surround_master ()) {
|
||||
return;
|
||||
}
|
||||
if (s->is_master ()) {
|
||||
return;
|
||||
}
|
||||
|
@ -2254,7 +2254,7 @@ ProcessorBox::build_possible_aux_menu ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_route->is_monitor () || _route->is_foldbackbus () || _route->is_master ()) {
|
||||
if (_route->is_main_bus ()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2263,11 +2263,8 @@ ProcessorBox::build_possible_aux_menu ()
|
||||
MenuList& items = menu->items();
|
||||
|
||||
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||
if ((*r)->is_master() || (*r)->is_monitor () || *r == _route) {
|
||||
/* don't allow sending to master or monitor or to self */
|
||||
continue;
|
||||
}
|
||||
if ((*r)->is_foldbackbus ()) {
|
||||
if ((*r)->is_main_bus() || *r == _route) {
|
||||
/* don't allow sending to master, monitor, folback, surround or to self */
|
||||
continue;
|
||||
}
|
||||
if (_route->internal_send_for (*r)) {
|
||||
@ -2290,7 +2287,7 @@ ProcessorBox::build_possible_listener_menu ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_route->is_monitor () || _route->is_foldbackbus ()) {
|
||||
if (_route->is_monitor () || _route->is_foldbackbus () || _route->is_surround_master ()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2299,8 +2296,8 @@ ProcessorBox::build_possible_listener_menu ()
|
||||
MenuList& items = menu->items();
|
||||
|
||||
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||
if ((*r)->is_master() || (*r)->is_monitor () || *r == _route) {
|
||||
/* don't allow sending to master or monitor or to self */
|
||||
if ((*r)->is_singleton () || *r == _route) {
|
||||
/* don't allow sending to master or monitor, surround or to self */
|
||||
continue;
|
||||
}
|
||||
if (!(*r)->is_foldbackbus ()) {
|
||||
@ -2326,7 +2323,7 @@ ProcessorBox::build_possible_remove_listener_menu ()
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_route->is_monitor () || _route->is_foldbackbus ()) {
|
||||
if (_route->is_monitor () || _route->is_foldbackbus () || _route->is_surround_master ()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -2335,7 +2332,7 @@ ProcessorBox::build_possible_remove_listener_menu ()
|
||||
MenuList& items = menu->items();
|
||||
|
||||
for (RouteList::iterator r = rl->begin(); r != rl->end(); ++r) {
|
||||
if ((*r)->is_master() || (*r)->is_monitor () || *r == _route) {
|
||||
if ((*r)->is_singleton() || *r == _route) {
|
||||
/* don't allow sending to master or monitor or to self */
|
||||
continue;
|
||||
}
|
||||
@ -2415,8 +2412,8 @@ ProcessorBox::show_processor_menu (int arg)
|
||||
}
|
||||
}
|
||||
|
||||
ActionManager::get_action (X_("ProcessorMenu"), "newinsert")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus ());
|
||||
ActionManager::get_action (X_("ProcessorMenu"), "newsend")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus ());
|
||||
ActionManager::get_action (X_("ProcessorMenu"), "newinsert")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus () && !_route->is_surround_master ());
|
||||
ActionManager::get_action (X_("ProcessorMenu"), "newsend")->set_sensitive (!_route->is_monitor () && !_route->is_foldbackbus () && !_route->is_surround_master ());
|
||||
|
||||
ProcessorEntry* single_selection = 0;
|
||||
if (processor_display.selection().size() == 1) {
|
||||
|
@ -585,7 +585,7 @@ RouteListBase::add_stripables (StripableList& slist)
|
||||
midi_trk = std::dynamic_pointer_cast<MidiTrack> (stripable);
|
||||
|
||||
row[_columns.is_track] = (std::dynamic_pointer_cast<Track> (stripable) != 0);
|
||||
row[_columns.activatable] = !stripable->is_master ();
|
||||
row[_columns.activatable] = !stripable->is_singleton ();
|
||||
|
||||
if (midi_trk) {
|
||||
row[_columns.is_input_active] = midi_trk->input_active ();
|
||||
|
@ -807,7 +807,7 @@ RouteTimeAxisView::build_display_menu ()
|
||||
r.push_back (route ());
|
||||
}
|
||||
|
||||
if (!_route->is_master()) {
|
||||
if (!_route->is_singleton ()) {
|
||||
route_group_menu->build (r);
|
||||
items.push_back (MenuElem (_("Group"), *route_group_menu->menu ()));
|
||||
}
|
||||
@ -826,7 +826,7 @@ RouteTimeAxisView::build_display_menu ()
|
||||
if (!r) {
|
||||
continue;
|
||||
}
|
||||
always_active |= r->route()->is_master();
|
||||
always_active |= r->route()->is_singleton ();
|
||||
#ifdef MIXBUS
|
||||
always_active |= r->route()->mixbus() != 0;
|
||||
#endif
|
||||
@ -885,13 +885,15 @@ RouteTimeAxisView::build_display_menu ()
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Hide"), sigc::bind (sigc::mem_fun(_editor, &PublicEditor::hide_track_in_display), this, true)));
|
||||
if (_route && !_route->is_master()) {
|
||||
|
||||
if (_route && !_route->is_singleton ()) {
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Duplicate..."), boost::bind (&ARDOUR_UI::start_duplicate_routes, ARDOUR_UI::instance())));
|
||||
}
|
||||
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Remove"), sigc::mem_fun(_editor, &PublicEditor::remove_tracks)));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
RouteTimeAxisView::layer_display_menu_change (Gtk::MenuItem* item)
|
||||
|
@ -517,7 +517,7 @@ RouteUI::mute_press (GdkEventButton* ev)
|
||||
*copy = _session->get_stripables ();
|
||||
|
||||
for (StripableList::iterator i = copy->begin(); i != copy->end(); ) {
|
||||
if ((*i)->is_master() || (*i)->is_monitor()) {
|
||||
if ((*i)->is_singleton ()) {
|
||||
i = copy->erase (i);
|
||||
} else {
|
||||
++i;
|
||||
@ -1817,7 +1817,7 @@ RouteUI::set_route_active (bool a, bool apply_to_selection)
|
||||
{
|
||||
if (apply_to_selection) {
|
||||
ARDOUR_UI::instance()->the_editor().get_selection().tracks.foreach_route_ui (boost::bind (&RouteUI::set_route_active, _1, a, false));
|
||||
} else if (!is_master ()
|
||||
} else if (!is_singleton ()
|
||||
#ifdef MIXBUS
|
||||
&& !_route->mixbus()
|
||||
#endif
|
||||
@ -1879,6 +1879,12 @@ RouteUI::is_master () const
|
||||
return _route && _route->is_master ();
|
||||
}
|
||||
|
||||
bool
|
||||
RouteUI::is_singleton () const
|
||||
{
|
||||
return _route && _route->is_singleton ();
|
||||
}
|
||||
|
||||
bool
|
||||
RouteUI::is_foldbackbus () const
|
||||
{
|
||||
|
@ -104,6 +104,7 @@ public:
|
||||
bool is_track () const;
|
||||
bool is_master () const;
|
||||
bool is_foldbackbus () const;
|
||||
bool is_singleton () const;
|
||||
bool is_audio_track () const;
|
||||
bool is_midi_track () const;
|
||||
bool has_audio_outputs () const;
|
||||
|
@ -262,7 +262,7 @@ TriggerStrip::build_route_ops_menu ()
|
||||
items.push_back (SeparatorElem());
|
||||
}
|
||||
|
||||
if ((!_route->is_master() || !active)
|
||||
if ((!_route->is_singleton () || !active)
|
||||
#ifdef MIXBUS
|
||||
&& !_route->mixbus()
|
||||
#endif
|
||||
@ -325,7 +325,7 @@ TriggerStrip::build_route_ops_menu ()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!_route->is_master()) {
|
||||
if (!_route->is_singleton ()) {
|
||||
items.push_back (SeparatorElem());
|
||||
items.push_back (MenuElem (_("Duplicate..."), sigc::mem_fun (*this, &RouteUI::duplicate_selected_routes)));
|
||||
items.push_back (SeparatorElem());
|
||||
|
Loading…
Reference in New Issue
Block a user