Make discrete mode work for MIDI automation views. Fixes #3178.
authorCarl Hetherington <carl@carlh.net>
Tue, 25 May 2010 16:40:35 +0000 (16:40 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 25 May 2010 16:40:35 +0000 (16:40 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7159 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/automation_streamview.cc
gtk2_ardour/automation_streamview.h
gtk2_ardour/automation_time_axis.cc

index 3eeb3bd6ebb3d7c5f6949d7b7f36c377df2d9430..fad14006b24b9ebc84a6c341367e4430c34f0897 100644 (file)
@@ -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);
+               }
+       }
+}
index f5463ca4004cf47312a4dd6bd0690306a126d568..a3235f7b0eddde563bafe5103c695aa0524ca44b 100644 (file)
@@ -56,6 +56,8 @@ class AutomationStreamView : public StreamView
 
        bool has_automation () const;
 
+       void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
+
   private:
        void setup_rec_box ();
 
index b36ba59e0c5724b0d0c8b45686e306900edb78ab..51923089ad6084b586c408e55f64a092741582bb 100644 (file)
@@ -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