Show Sends button should instigate a Spill, akin to a VCA spill
This commit is contained in:
parent
7058a8074f
commit
c765079b2f
@ -346,7 +346,7 @@ FoldbackStrip::init ()
|
|||||||
|
|
||||||
_show_sends_button.set_name ("send alert button");
|
_show_sends_button.set_name ("send alert button");
|
||||||
_show_sends_button.set_text (_("Show Sends"));
|
_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_flags (CAN_FOCUS);
|
||||||
send_display.set_spacing (4);
|
send_display.set_spacing (4);
|
||||||
@ -404,8 +404,8 @@ FoldbackStrip::init ()
|
|||||||
// or hides.
|
// or hides.
|
||||||
global_vpacker.pack_start (prev_next_box, Gtk::PACK_SHRINK);
|
global_vpacker.pack_start (prev_next_box, Gtk::PACK_SHRINK);
|
||||||
global_vpacker.pack_start (name_button, 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 (_show_sends_button, Gtk::PACK_SHRINK);
|
||||||
|
global_vpacker.pack_start (_invert_button_box, Gtk::PACK_SHRINK);
|
||||||
global_vpacker.pack_start (send_scroller, true, true);
|
global_vpacker.pack_start (send_scroller, true, true);
|
||||||
#ifndef MIXBUS
|
#ifndef MIXBUS
|
||||||
//add a spacer underneath the foldback bus;
|
//add a spacer underneath the foldback bus;
|
||||||
@ -1283,11 +1283,13 @@ void
|
|||||||
FoldbackStrip::show_sends_clicked ()
|
FoldbackStrip::show_sends_clicked ()
|
||||||
{
|
{
|
||||||
if (_showing_sends) {
|
if (_showing_sends) {
|
||||||
|
Mixer_UI::instance()->show_spill (boost::shared_ptr<ARDOUR::Stripable>());
|
||||||
BusSendDisplayChanged (boost::shared_ptr<Route> ()); /* EMIT SIGNAL */
|
BusSendDisplayChanged (boost::shared_ptr<Route> ()); /* EMIT SIGNAL */
|
||||||
_showing_sends = false;
|
_showing_sends = false;
|
||||||
_show_sends_button.set_active (false);
|
_show_sends_button.set_active (false);
|
||||||
send_blink_connection.disconnect ();
|
send_blink_connection.disconnect ();
|
||||||
} else {
|
} else {
|
||||||
|
Mixer_UI::instance()->show_spill (_route);
|
||||||
BusSendDisplayChanged (_route); /* EMIT SIGNAL */
|
BusSendDisplayChanged (_route); /* EMIT SIGNAL */
|
||||||
_showing_sends = true;
|
_showing_sends = true;
|
||||||
_show_sends_button.set_active (true);
|
_show_sends_button.set_active (true);
|
||||||
|
@ -662,7 +662,7 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
|
|||||||
/* non-master bus */
|
/* non-master bus */
|
||||||
|
|
||||||
if (!_route->is_master()) {
|
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();
|
show_sends_button->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -787,7 +787,7 @@ MixerStrip::set_width_enum (Width w, void* owner)
|
|||||||
case Wide:
|
case Wide:
|
||||||
|
|
||||||
if (show_sends_button) {
|
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:
|
case Narrow:
|
||||||
|
|
||||||
if (show_sends_button) {
|
if (show_sends_button) {
|
||||||
show_sends_button->set_text (_("Snd"));
|
show_sends_button->set_text (_("Show"));
|
||||||
}
|
}
|
||||||
|
|
||||||
gain_meter().setup_meters (); // recalc meter width
|
gain_meter().setup_meters (); // recalc meter width
|
||||||
|
@ -1441,17 +1441,24 @@ Mixer_UI::track_list_delete (const Gtk::TreeModel::Path&)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
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();
|
TreeModel::Children rows = track_model->children();
|
||||||
std::list<boost::shared_ptr<VCA> > vcas;
|
std::list<boost::shared_ptr<VCA> > vcas;
|
||||||
vcas.push_back (vca);
|
|
||||||
|
|
||||||
for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
|
if (vca) {
|
||||||
AxisView* av = (*i)[stripable_columns.strip];
|
vcas.push_back (vca);
|
||||||
VCAMasterStrip* vms = dynamic_cast<VCAMasterStrip*> (av);
|
|
||||||
if (vms && vms->vca()->slaved_to (vca)) {
|
for (TreeModel::Children::const_iterator i = rows.begin(); i != rows.end(); ++i) {
|
||||||
vcas.push_back (vms->vca());
|
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];
|
AxisView* av = (*i)[stripable_columns.strip];
|
||||||
MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
|
MixerStrip* strip = dynamic_cast<MixerStrip*> (av);
|
||||||
bool const visible = (*i)[stripable_columns.visible];
|
bool const visible = (*i)[stripable_columns.visible];
|
||||||
|
bool slaved = false;
|
||||||
|
bool feeds = false;
|
||||||
|
|
||||||
if (!strip) {
|
if (!strip) {
|
||||||
/* we're in the middle of changing a row, don't worry */
|
/* 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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool slaved = false;
|
if (vca) {
|
||||||
for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
|
for (std::list<boost::shared_ptr<VCA> >::const_iterator m = vcas.begin(); m != vcas.end(); ++m) {
|
||||||
if (strip->route()->slaved_to (*m)) {
|
if (strip->route()->slaved_to (*m)) {
|
||||||
slaved = true;
|
slaved = true;
|
||||||
break;
|
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()) {
|
if (strip->packed()) {
|
||||||
strip_packer.reorder_child (*strip, -1); /* put at end */
|
strip_packer.reorder_child (*strip, -1); /* put at end */
|
||||||
@ -1518,6 +1535,12 @@ Mixer_UI::redisplay_track_list ()
|
|||||||
}
|
}
|
||||||
spill_redisplay (sv);
|
spill_redisplay (sv);
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
if (_spill_scroll_position <= 0 && scroller.get_hscrollbar()) {
|
||||||
|
_spill_scroll_position = scroller.get_hscrollbar()->get_adjustment()->get_value();
|
||||||
|
}
|
||||||
|
spill_redisplay (ss);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ private:
|
|||||||
void track_name_changed (MixerStrip *);
|
void track_name_changed (MixerStrip *);
|
||||||
|
|
||||||
void redisplay_track_list ();
|
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 no_track_list_redisplay;
|
||||||
bool track_display_button_press (GdkEventButton*);
|
bool track_display_button_press (GdkEventButton*);
|
||||||
void strip_width_changed ();
|
void strip_width_changed ();
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
#include "keyboard.h"
|
#include "keyboard.h"
|
||||||
#include "latency_gui.h"
|
#include "latency_gui.h"
|
||||||
#include "mixer_strip.h"
|
#include "mixer_strip.h"
|
||||||
|
#include "mixer_ui.h"
|
||||||
#include "patch_change_widget.h"
|
#include "patch_change_widget.h"
|
||||||
#include "plugin_pin_dialog.h"
|
#include "plugin_pin_dialog.h"
|
||||||
#include "rgb_macros.h"
|
#include "rgb_macros.h"
|
||||||
@ -205,7 +206,7 @@ RouteUI::init ()
|
|||||||
|
|
||||||
show_sends_button = manage (new ArdourButton);
|
show_sends_button = manage (new ArdourButton);
|
||||||
show_sends_button->set_name ("send alert button");
|
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 = new ArdourButton (ArdourButton::default_elements);
|
||||||
monitor_input_button->set_name ("monitor button");
|
monitor_input_button->set_name ("monitor button");
|
||||||
@ -1152,8 +1153,10 @@ RouteUI::show_sends_press(GdkEventButton* ev)
|
|||||||
|
|
||||||
if (s == _route) {
|
if (s == _route) {
|
||||||
set_showing_sends_to (boost::shared_ptr<Route> ());
|
set_showing_sends_to (boost::shared_ptr<Route> ());
|
||||||
|
Mixer_UI::instance()->show_spill (boost::shared_ptr<ARDOUR::Stripable>());
|
||||||
} else {
|
} else {
|
||||||
set_showing_sends_to (_route);
|
set_showing_sends_to (_route);
|
||||||
|
Mixer_UI::instance()->show_spill (_route);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user