13
0

Show Sends button should instigate a Spill, akin to a VCA spill

This commit is contained in:
Ben Loftis 2020-03-23 15:13:39 -05:00
parent 7058a8074f
commit c765079b2f
5 changed files with 48 additions and 20 deletions

View File

@ -346,7 +346,7 @@ FoldbackStrip::init ()
_show_sends_button.set_name ("send alert button");
_show_sends_button.set_text (_("Show Sends"));
UI::instance()->set_tip (&_show_sends_button, _("make mixer strips show sends to this bus"), "");
UI::instance()->set_tip (&_show_sends_button, _("Show the strips that send to this bus, and control them from the faders"), "");
send_display.set_flags (CAN_FOCUS);
send_display.set_spacing (4);
@ -404,8 +404,8 @@ FoldbackStrip::init ()
// or hides.
global_vpacker.pack_start (prev_next_box, Gtk::PACK_SHRINK);
global_vpacker.pack_start (name_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_invert_button_box, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_show_sends_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_invert_button_box, Gtk::PACK_SHRINK);
global_vpacker.pack_start (send_scroller, true, true);
#ifndef MIXBUS
//add a spacer underneath the foldback bus;
@ -1283,11 +1283,13 @@ void
FoldbackStrip::show_sends_clicked ()
{
if (_showing_sends) {
Mixer_UI::instance()->show_spill (boost::shared_ptr<ARDOUR::Stripable>());
BusSendDisplayChanged (boost::shared_ptr<Route> ()); /* EMIT SIGNAL */
_showing_sends = false;
_show_sends_button.set_active (false);
send_blink_connection.disconnect ();
} else {
Mixer_UI::instance()->show_spill (_route);
BusSendDisplayChanged (_route); /* EMIT SIGNAL */
_showing_sends = true;
_show_sends_button.set_active (true);

View File

@ -662,7 +662,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
/* non-master bus */
if (!_route->is_master()) {
rec_mon_table.attach (*show_sends_button, 0, 1, 0, 2);
rec_mon_table.attach (*show_sends_button, 0, 3, 0, 2);
show_sends_button->show();
}
}
@ -787,7 +787,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
case Wide:
if (show_sends_button) {
show_sends_button->set_text (_("Aux"));
show_sends_button->set_text (_("Show Sends"));
}
{
@ -801,7 +801,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
case Narrow:
if (show_sends_button) {
show_sends_button->set_text (_("Snd"));
show_sends_button->set_text (_("Show"));
}
gain_meter().setup_meters (); // recalc meter width

View File

@ -1441,17 +1441,24 @@ Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
}
void
Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
Mixer_UI::spill_redisplay (boost::shared_ptr<Stripable> s)
{
boost::shared_ptr<VCA> vca = boost::dynamic_pointer_cast<VCA> (s);
boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (s);
TreeModel::Children rows = track_model->children();
std::list<boost::shared_ptr<VCA> > vcas;
vcas.push_back (vca);
for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
AxisView* av = (*i)[stripable_columns.strip];
VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
if (vms && vms->vca()->slaved_to (vca)) {
vcas.push_back (vms->vca());
if (vca) {
vcas.push_back (vca);
for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
AxisView* av = (*i)[stripable_columns.strip];
VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
if (vms && vms->vca()->slaved_to (vca)) {
vcas.push_back (vms->vca());
}
}
}
@ -1460,6 +1467,8 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
AxisView* av = (*i)[stripable_columns.strip];
MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
bool const visible = (*i)[stripable_columns.visible];
bool slaved = false;
bool feeds = false;
if (!strip) {
/* we're in the middle of changing a row, don't worry */
@ -1475,15 +1484,23 @@ Mixer_UI::spill_redisplay (boost::shared_ptr<VCA> vca)
continue;
}
bool slaved = false;
for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
if (strip->route()->slaved_to (*m)) {
slaved = true;
break;
if (vca) {
for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
if (strip->route()->slaved_to (*m)) {
slaved = true;
break;
}
}
}
if (slaved && visible) {
if (r) {
feeds = strip->route()->feeds (r);
}
bool should_show = visible && (slaved || feeds);
should_show |= (strip->route() == r); //the spilled aux should itself be shown...
if (should_show) {
if (strip->packed()) {
strip_packer.reorder_child (*strip, -1); /* put at end */
@ -1518,6 +1535,12 @@ Mixer_UI::redisplay_track_list ()
}
spill_redisplay (sv);
return;
} else {
if (_spill_scroll_position <= 0 && scroller.get_hscrollbar()) {
_spill_scroll_position = scroller.get_hscrollbar()->get_adjustment()->get_value();
}
spill_redisplay (ss);
return;
}
}

View File

@ -246,7 +246,7 @@ private:
void track_name_changed (MixerStrip *);
void redisplay_track_list ();
void spill_redisplay (boost::shared_ptr<ARDOUR::VCA>);
void spill_redisplay (boost::shared_ptr<ARDOUR::Stripable>);
bool no_track_list_redisplay;
bool track_display_button_press (GdkEventButton*);
void strip_width_changed ();

View File

@ -77,6 +77,7 @@
#include "keyboard.h"
#include "latency_gui.h"
#include "mixer_strip.h"
#include "mixer_ui.h"
#include "patch_change_widget.h"
#include "plugin_pin_dialog.h"
#include "rgb_macros.h"
@ -205,7 +206,7 @@ RouteUI::init ()
show_sends_button = manage (new ArdourButton);
show_sends_button->set_name ("send alert button");
UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), "");
UI::instance()->set_tip (show_sends_button, _("Show the strips that send to this bus, and control them from the faders"), "");
monitor_input_button = new ArdourButton (ArdourButton::default_elements);
monitor_input_button->set_name ("monitor button");
@ -1152,8 +1153,10 @@ RouteUI::show_sends_press(GdkEventButton* ev)
if (s == _route) {
set_showing_sends_to (boost::shared_ptr<Route> ());
Mixer_UI::instance()->show_spill (boost::shared_ptr<ARDOUR::Stripable>());
} else {
set_showing_sends_to (_route);
Mixer_UI::instance()->show_spill (_route);
}
}
}