From b0f68a0f5c8ee0cba1c9c2b2319c3369d5650a87 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 8 Jun 2017 23:45:07 +0200 Subject: Prepare AutomationTimeAxisView for non-route (VCA) automation --- gtk2_ardour/automation_time_axis.cc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gtk2_ardour/automation_time_axis.cc') diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 3028fdaefd..f245cf74e5 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -75,7 +75,7 @@ bool AutomationTimeAxisView::have_name_font = false; */ AutomationTimeAxisView::AutomationTimeAxisView ( Session* s, - boost::shared_ptr r, + boost::shared_ptr strip, boost::shared_ptr a, boost::shared_ptr c, Evoral::Parameter p, @@ -88,7 +88,7 @@ AutomationTimeAxisView::AutomationTimeAxisView ( ) : SessionHandlePtr (s) , TimeAxisView (s, e, &parent, canvas) - , _route (r) + , _stripable (strip) , _control (c) , _automatable (a) , _parameter (p) @@ -113,9 +113,9 @@ AutomationTimeAxisView::AutomationTimeAxisView ( tipname += nom; _name = tipname; - CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, r->name())); - CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, r->name())); - CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, r->name())); + CANVAS_DEBUG_NAME (_canvas_display, string_compose ("main for auto %2/%1", _name, strip->name())); + CANVAS_DEBUG_NAME (selection_group, string_compose ("selections for auto %2/%1", _name, strip->name())); + CANVAS_DEBUG_NAME (_ghost_group, string_compose ("ghosts for auto %2/%1", _name, strip->name())); if (!have_name_font) { name_font = get_font_for_style (X_("AutomationTrackName")); @@ -297,8 +297,8 @@ AutomationTimeAxisView::AutomationTimeAxisView ( automation_state_changed (); UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &AutomationTimeAxisView::color_handler)); - _route->DropReferences.connect ( - _route_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context () + _stripable->DropReferences.connect ( + _stripable_connections, invalidator (*this), boost::bind (&AutomationTimeAxisView::route_going_away, this), gui_context () ); } @@ -311,7 +311,7 @@ AutomationTimeAxisView::~AutomationTimeAxisView () void AutomationTimeAxisView::route_going_away () { - _route.reset (); + _stripable.reset (); } void @@ -490,9 +490,9 @@ AutomationTimeAxisView::set_height (uint32_t h, TrackHeightMode m) } if (changed) { - if (_canvas_display->visible() && _route) { + if (_canvas_display->visible() && _stripable) { /* only emit the signal if the height really changed and we were visible */ - _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */ + _stripable->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */ } } } @@ -916,14 +916,14 @@ AutomationTimeAxisView::lines () const string AutomationTimeAxisView::state_id() const { - if (_automatable != _route && _control) { + if (_automatable != _stripable && _control) { return string("automation ") + _control->id().to_s(); } else if (_parameter) { const string parameter_str = PBD::to_string (_parameter.type()) + "/" + PBD::to_string (_parameter.id()) + "/" + PBD::to_string (_parameter.channel ()); - return string("automation ") + PBD::to_string(_route->id()) + " " + parameter_str; + return string("automation ") + PBD::to_string(_stripable->id()) + " " + parameter_str; } else { error << "Automation time axis has no state ID" << endmsg; return ""; @@ -1048,18 +1048,18 @@ AutomationTimeAxisView::cut_copy_clear_one (AutomationLine& line, Selection& sel PresentationInfo const & AutomationTimeAxisView::presentation_info () const { - return _route->presentation_info(); + return _stripable->presentation_info(); } boost::shared_ptr AutomationTimeAxisView::stripable () const { - return _route; + return _stripable; } Gdk::Color AutomationTimeAxisView::color () const { - return gdk_color_from_rgb (_route->presentation_info().color()); + return gdk_color_from_rgb (_stripable->presentation_info().color()); } -- cgit v1.2.3