#include "ardour/rc_configuration.h"
+#include "control_protocol/control_protocol.h"
+
#include "actions.h"
#include "ardour_ui.h"
#include "audio_time_axis.h"
#include "selection.h"
#include "ui_config.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace Gtkmm2ext;
void
Editor::create_editor_mixer ()
{
- current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(),
- _session,
- false);
+ current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), _session, false);
current_mixer_strip->Hiding.connect (sigc::mem_fun(*this, &Editor::current_mixer_strip_hidden));
current_mixer_strip->WidthChanged.connect (sigc::mem_fun (*this, &Editor::mixer_strip_width_changed));
return;
}
- Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
-
- if (act) {
- Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
- if (!tact || !tact->get_active()) {
- /* not showing mixer strip presently */
- return;
- }
- }
-
- if (current_mixer_strip == 0) {
- create_editor_mixer ();
- }
-
-
// if this is an automation track, then we shold the mixer strip should
// show the parent
}
}
+ /* Typically this is set by changing the TAV selection but if for any
+ reason we decide to show a different strip for some reason, make
+ sure that control surfaces can find it.
+ */
+ ARDOUR::ControlProtocol::set_first_selected_stripable (route);
+
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (X_("Editor"), X_("show-editor-mixer"));
+
+ if (act) {
+ Glib::RefPtr<Gtk::ToggleAction> tact = Glib::RefPtr<Gtk::ToggleAction>::cast_dynamic(act);
+ if (!tact || !tact->get_active()) {
+ /* not showing mixer strip presently */
+ return;
+ }
+ }
+
+ if (current_mixer_strip == 0) {
+ create_editor_mixer ();
+ }
+
if (current_mixer_strip->route() == route) {
return;
}
_following_mixer_selection = true;
selection->block_tracks_changed (true);
- RouteUISelection& s (Mixer_UI::instance()->selection().routes);
+ AxisViewSelection& s (Mixer_UI::instance()->selection().axes);
selection->clear_tracks ();
- for (RouteUISelection::iterator i = s.begin(); i != s.end(); ++i) {
- TimeAxisView* tav = get_route_view_by_route_id ((*i)->route()->id());
+ for (AxisViewSelection::iterator i = s.begin(); i != s.end(); ++i) {
+ TimeAxisView* tav = axis_view_from_stripable ((*i)->stripable());
if (tav) {
selection->add (tav);
}