#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
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_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()));
+ }
+ }
}
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 ()
{