, toolbar_selection_clock_table (2,3)
, automation_mode_button (_("mode"))
- , global_automation_button (_("automation"))
, _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
, midi_panic_button (_("Panic"))
ControlProtocol::ZoomIn.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, false), gui_context());
ControlProtocol::ZoomOut.connect (*this, invalidator (*this), boost::bind (&Editor::temporal_zoom_step, this, true), gui_context());
ControlProtocol::ScrollTimeline.connect (*this, invalidator (*this), ui_bind (&Editor::control_scroll, this, _1), gui_context());
+ ControlProtocol::SelectByRID.connect (*this, invalidator (*this), ui_bind (&Editor::control_select, this, _1), gui_context());
BasicUI::AccessAction.connect (*this, invalidator (*this), ui_bind (&Editor::access_action, this, _1, _2), gui_context());
/* problematic: has to return a value and thus cannot be x-thread */
temporal_zoom (fpu);
}
+void
+Editor::control_select (uint32_t rid)
+{
+ /* handles the (static) signal from the ControlProtocol class that
+ * requests setting the selected track to a given RID
+ */
+
+ if (!_session) {
+ return;
+ }
+
+ boost::shared_ptr<Route> r = _session->route_by_remote_id (rid);
+
+ if (!r) {
+ return;
+ }
+
+ TimeAxisView* tav = axis_view_from_route (r);
+
+ if (tav) {
+ selection->set (tav);
+ } else {
+ selection->clear_tracks ();
+ }
+}
+
void
Editor::control_scroll (float fraction)
{