summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Loftis <ben@harrisonconsoles.com>2020-03-23 15:13:39 -0500
committerBen Loftis <ben@harrisonconsoles.com>2020-03-23 15:24:08 -0500
commitc765079b2f7c5e369875c9f714f078dc0c16af90 (patch)
treeb1d6fb5406b1a36b26e3594db227712242cc53f7
parent7058a8074fa7d8778e30ef2e0adbe5e69f179d63 (diff)
Show Sends button should instigate a Spill, akin to a VCA spill
-rw-r--r--gtk2_ardour/foldback_strip.cc6
-rw-r--r--gtk2_ardour/mixer_strip.cc6
-rw-r--r--gtk2_ardour/mixer_ui.cc49
-rw-r--r--gtk2_ardour/mixer_ui.h2
-rw-r--r--gtk2_ardour/route_ui.cc5
5 files changed, 48 insertions, 20 deletions
diff --git a/gtk2_ardour/foldback_strip.cc b/gtk2_ardour/foldback_strip.cc
index 4abb03aaa8..055f57b5df 100644
--- a/gtk2_ardour/foldback_strip.cc
+++ b/gtk2_ardour/foldback_strip.cc
@@ -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);
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index ba7f6e0942..b35a2b412e 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -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
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index e568a58623..6eb5095016 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -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;
}
}
diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h
index 7adc79d99e..7fb0c1f10c 100644
--- a/gtk2_ardour/mixer_ui.h
+++ b/gtk2_ardour/mixer_ui.h
@@ -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 ();
diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc
index 2110c2ff17..3ed8335cee 100644
--- a/gtk2_ardour/route_ui.cc
+++ b/gtk2_ardour/route_ui.cc
@@ -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);
}
}
}