summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-25 16:40:35 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-25 16:40:35 +0000
commit2881a495ef8aa020a86ee761cac7a3ba74bcfc58 (patch)
treed54fb828450c1edcc8c768776f648fbdab68eb6e
parenta57b9cdd99b47fde8bfa265c0f72a380bb5cbb6f (diff)
Make discrete mode work for MIDI automation views. Fixes #3178.
git-svn-id: svn://localhost/ardour2/branches/3.0@7159 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/automation_streamview.cc12
-rw-r--r--gtk2_ardour/automation_streamview.h2
-rw-r--r--gtk2_ardour/automation_time_axis.cc7
3 files changed, 20 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_streamview.cc b/gtk2_ardour/automation_streamview.cc
index 3eeb3bd6eb..fad14006b2 100644
--- a/gtk2_ardour/automation_streamview.cc
+++ b/gtk2_ardour/automation_streamview.cc
@@ -225,4 +225,14 @@ AutomationStreamView::has_automation () const
return false;
}
-
+void
+AutomationStreamView::set_interpolation (AutomationList::InterpolationStyle s)
+{
+ for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
+ AutomationRegionView* arv = dynamic_cast<AutomationRegionView*> (*i);
+ assert (arv);
+ if (arv->line()) {
+ arv->line()->set_interpolation (s);
+ }
+ }
+}
diff --git a/gtk2_ardour/automation_streamview.h b/gtk2_ardour/automation_streamview.h
index f5463ca400..a3235f7b0e 100644
--- a/gtk2_ardour/automation_streamview.h
+++ b/gtk2_ardour/automation_streamview.h
@@ -56,6 +56,8 @@ class AutomationStreamView : public StreamView
bool has_automation () const;
+ void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
+
private:
void setup_rec_box ();
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index b36ba59e0c..51923089ad 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -364,6 +364,10 @@ AutomationTimeAxisView::interpolation_changed ()
if (_line) {
_line->set_interpolation(style);
}
+
+ if (_view) {
+ _view->set_interpolation (style);
+ }
}
void
@@ -373,6 +377,9 @@ AutomationTimeAxisView::set_interpolation (AutomationList::InterpolationStyle st
if (_line) {
_line->set_interpolation(style);
}
+ if (_view) {
+ _view->set_interpolation (style);
+ }
}
void