add support for reverb & chorus in a-fluidsynth
[ardour.git] / gtk2_ardour / streamview.cc
index c737f7842ce0335a248bf5af970d45a91ee2996c..bcab05b9c81095eb3c1041f42274fef5669c4bb8 100644 (file)
@@ -45,7 +45,7 @@
 #include "ui_config.h"
 #include "utils.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -78,7 +78,7 @@ StreamView::StreamView (RouteTimeAxisView& tv, ArdourCanvas::Container* canvas_g
 
        if (_trackview.is_track()) {
                _trackview.track()->DiskstreamChanged.connect (*this, invalidator (*this), boost::bind (&StreamView::diskstream_changed, this), gui_context());
-               _trackview.track()->RecordEnableChanged.connect (*this, invalidator (*this), boost::bind (&StreamView::rec_enable_changed, this), gui_context());
+               _trackview.track()->rec_enable_control()->Changed.connect (*this, invalidator (*this), boost::bind (&StreamView::rec_enable_changed, this), gui_context());
 
                _trackview.session()->TransportStateChange.connect (*this, invalidator (*this), boost::bind (&StreamView::transport_changed, this), gui_context());
                _trackview.session()->TransportLooped.connect (*this, invalidator (*this), boost::bind (&StreamView::transport_looped, this), gui_context());
@@ -119,7 +119,7 @@ StreamView::set_height (double h)
                return -1;
        }
 
-       if (canvas_rect->y1() == h) {
+       if (height == h) {
                return 0;
        }
 
@@ -139,6 +139,10 @@ StreamView::set_samples_per_pixel (double fpp)
                return -1;
        }
 
+       if (fpp == _samples_per_pixel) {
+               return 0;
+       }
+
        _samples_per_pixel = fpp;
 
        for (i = region_views.begin(); i != region_views.end(); ++i) {
@@ -292,6 +296,7 @@ StreamView::playlist_layered (boost::weak_ptr<Track> wtr)
 
        if (_layer_display == Stacked) {
                update_contents_height ();
+               /* tricky. playlist_changed() does this as well, and its really inefficient. */
                update_coverage_frames ();
        } else {
                /* layering has probably been modified. reflect this in the canvas. */
@@ -311,12 +316,12 @@ StreamView::playlist_switched (boost::weak_ptr<Track> wtr)
        /* disconnect from old playlist */
 
        playlist_connections.drop_connections ();
-       undisplay_track ();
+       //undisplay_track ();
 
        /* draw it */
-
+       tr->playlist()->freeze();
        redisplay_track ();
-
+       tr->playlist()->thaw();
        /* update layers count and the y positions and heights of our regions */
        _layers = tr->playlist()->top_layer() + 1;
        update_contents_height ();
@@ -494,7 +499,7 @@ StreamView::num_selected_regionviews () const
        uint32_t cnt = 0;
 
        for (list<RegionView*>::const_iterator i = region_views.begin(); i != region_views.end(); ++i) {
-               if ((*i)->get_selected()) {
+               if ((*i)->selected()) {
                        ++cnt;
                }
        }
@@ -513,7 +518,7 @@ void
 StreamView::foreach_selected_regionview (sigc::slot<void,RegionView*> slot)
 {
        for (list<RegionView*>::iterator i = region_views.begin(); i != region_views.end(); ++i) {
-               if ((*i)->get_selected()) {
+               if ((*i)->selected()) {
                        slot (*i);
                }
        }