const string & nom,
const string & nomparent
)
- : AxisView (s)
+ : SessionHandlePtr (s)
, TimeAxisView (s, e, &parent, canvas)
, _route (r)
, _control (c)
//name label isn't editable on an automation track; remove the tooltip
set_tooltip (name_label, X_(""));
- /* repack the name label */
+ /* repack the name label, which TimeAxisView has already attached to
+ * the controls_table
+ */
if (name_label.get_parent()) {
name_label.get_parent()->remove (name_label);
/* add the buttons */
controls_table.set_border_width (1);
- controls_table.remove (name_hbox);
controls_table.attach (hide_button, 1, 2, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
controls_table.attach (name_label, 2, 3, 1, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND, 2, 0);
controls_table.attach (auto_button, 3, 4, 2, 3, Gtk::SHRINK, Gtk::SHRINK, 0, 0);
// subscribe to route_active_changed, ...
if (rtv && rtv->is_audio_track()) {
blank0->set_name ("AudioTrackControlsBaseUnselected");
- }
- else if (rtv && rtv->is_midi_track()) {
+ } else if (rtv && rtv->is_midi_track()) {
blank0->set_name ("MidiTrackControlsBaseUnselected");
- }
- else {
+ } else if (rtv) {
blank0->set_name ("AudioBusControlsBaseUnselected");
+ } else {
+ blank0->set_name ("UnknownControlsBaseUnselected");
}
blank0->set_size_request (-1, -1);
blank1->set_size_request (1, 0);
}
}
}
+
+PresentationInfo const &
+AutomationTimeAxisView::presentation_info () const
+{
+ return _route->presentation_info();
+}
+
+boost::shared_ptr<Stripable>
+AutomationTimeAxisView::stripable () const
+{
+ return _route;
+}
+
+Gdk::Color
+AutomationTimeAxisView::color () const
+{
+ return gdk_color_from_rgb (_route->presentation_info().color());
+}