From a57b9cdd99b47fde8bfa265c0f72a380bb5cbb6f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 25 May 2010 15:51:32 +0000 Subject: Allow region-based automation axes to report whether they have automation data or not. Should fix #3177. git-svn-id: svn://localhost/ardour2/branches/3.0@7158 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_streamview.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'gtk2_ardour/automation_streamview.cc') diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc index 9471d7c406..3eeb3bd6eb 100644 --- a/gtk2_ardour/automation_streamview.cc +++ b/gtk2_ardour/automation_streamview.cc @@ -209,3 +209,20 @@ AutomationStreamView::automation_state () const return line->the_list()->automation_state (); } + +bool +AutomationStreamView::has_automation () const +{ + list::const_iterator i = region_views.begin (); + while (i != region_views.end()) { + AutomationRegionView* rv = static_cast (*i); + if (rv->line() && rv->line()->npoints() > 0) { + return true; + } + ++i; + } + + return false; +} + + -- cgit v1.2.3