#include "ardour/panner_shell.h"
#include "ardour/phase_control.h"
#include "ardour/rc_configuration.h"
+#include "ardour/record_enable_control.h"
#include "ardour/route.h"
#include "ardour/session.h"
#include "ardour/send.h"
_stripable->gain_control()->Changed.connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_gain_changed, this, false), ui_context());
_stripable->PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
+ _stripable->presentation_info().PropertyChanged.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_property_changed, this, _1), ui_context());
- boost::shared_ptr<Track> trk = boost::dynamic_pointer_cast<ARDOUR::Track>(_stripable);
+ boost::shared_ptr<AutomationControl> rec_enable_control = _stripable->rec_enable_control ();
- if (trk) {
- _recenable->set_control (trk->rec_enable_control());
- trk->rec_enable_control()->Changed .connect(stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
+ if (rec_enable_control) {
+ _recenable->set_control (rec_enable_control);
+ rec_enable_control->Changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_record_enable_changed, this), ui_context());
}
// TODO this works when a currently-banked stripable is made inactive, but not
// when a stripable is activated which should be currently banked.
- // XXX Stripable
- // _stripable->active_changed.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_active_changed, this), ui_context());
_stripable->DropReferences.connect (stripable_connections, MISSING_INVALIDATOR, boost::bind (&Strip::notify_stripable_deleted, this), ui_context());
/* setup legal VPot modes for this stripable */
notify_mute_changed ();
notify_gain_changed ();
notify_property_changed (PBD::PropertyChange (ARDOUR::Properties::name));
+ notify_property_changed (PBD::PropertyChange (ARDOUR::Properties::selected));
notify_panner_azi_changed ();
notify_panner_width_changed ();
notify_record_enable_changed ();
}
}
-void
-Strip::notify_active_changed ()
-{
- _surface->mcp().refresh_current_bank();
-}
-
void
Strip::notify_stripable_deleted ()
{
void
Strip::notify_property_changed (const PropertyChange& what_changed)
{
- if (!what_changed.contains (ARDOUR::Properties::name)) {
- return;
+ if (what_changed.contains (ARDOUR::Properties::name)) {
+ show_stripable_name ();
}
- show_stripable_name ();
+ if (what_changed.contains (ARDOUR::Properties::selected)) {
+ if (_stripable) {
+ _surface->write (_select->set_state (_stripable->presentation_info().selected()));
+ _surface->mcp().update_selected (_stripable, _stripable->presentation_info().selected());
+ }
+ }
}
void
_controls_locked = false;
}
-void
-Strip::gui_selection_changed (const ARDOUR::StrongStripableNotificationList& rl)
-{
- for (ARDOUR::StrongStripableNotificationList::const_iterator i = rl.begin(); i != rl.end(); ++i) {
- if ((*i) == _stripable) {
- _surface->write (_select->set_state (on));
- return;
- }
- }
-
- _surface->write (_select->set_state (off));
-}
-
string
Strip::vpot_mode_string ()
{
boost::shared_ptr<AutomationControl> fader_control = _fader->control();
if (pot_control && fader_control) {
+
_vpot->set_control (fader_control);
_fader->set_control (pot_control);
- }
- if (_surface->mcp().flip_mode() == MackieControlProtocol::Normal) {
- do_parameter_display (GainAutomation, fader_control->get_value());
- } else {
- do_parameter_display (BusSendLevel, fader_control->get_value());
- }
+ /* update fader with pot value */
+
+ _surface->write (_fader->set_position (pot_control->internal_to_interface (pot_control->get_value ())));
- /* update fader */
+ /* update pot with fader value */
- _surface->write (_fader->set_position (pot_control->internal_to_interface (pot_control->get_value ())));
+ _surface->write (_vpot->set (fader_control->internal_to_interface (fader_control->get_value()), true, Pot::wrap));
- /* update pot */
- _surface->write (_vpot->set (fader_control->internal_to_interface (fader_control->get_value()), true, Pot::wrap));
+ if (_surface->mcp().flip_mode() == MackieControlProtocol::Normal) {
+ do_parameter_display (GainAutomation, fader_control->get_value());
+ } else {
+ do_parameter_display (BusSendLevel, pot_control->get_value());
+ }
+ }
} else {
/* do nothing */