summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_streamview.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-25 15:51:32 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-25 15:51:32 +0000
commita57b9cdd99b47fde8bfa265c0f72a380bb5cbb6f (patch)
treef7b4fe20b24ab41c0cccaff32c7173e1e14f605f /gtk2_ardour/automation_streamview.cc
parentef94fbf11ca36fc088e58cfa5691cbca7c7a3390 (diff)
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
Diffstat (limited to 'gtk2_ardour/automation_streamview.cc')
-rw-r--r--gtk2_ardour/automation_streamview.cc17
1 files changed, 17 insertions, 0 deletions
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<RegionView*>::const_iterator i = region_views.begin ();
+ while (i != region_views.end()) {
+ AutomationRegionView* rv = static_cast<AutomationRegionView*> (*i);
+ if (rv->line() && rv->line()->npoints() > 0) {
+ return true;
+ }
+ ++i;
+ }
+
+ return false;
+}
+
+