remove use of a boost::fast_pool_allocator without a mutex for Evoral::ControlList...
[ardour.git] / gtk2_ardour / streamview.cc
index 06a9d7795775b592561a7e673715be4533078bd5..19f6ee65bbd4c266b7bc4ee1fbf0f4ee5f2647fc 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "ardour/playlist.h"
 #include "ardour/region.h"
-#include "ardour/source.h"
 #include "ardour/track.h"
 #include "ardour/session.h"
 
@@ -181,7 +180,7 @@ StreamView::add_region_view (boost::weak_ptr<Region> wr)
 
        add_region_view_internal (r, true);
 
-       if (_layer_display == Stacked) {
+       if (_layer_display == Stacked || _layer_display == Expanded) {
                update_contents_height ();
        }
 }
@@ -301,7 +300,7 @@ StreamView::playlist_layered (boost::weak_ptr<Track> wtr)
                _layers = tr->playlist()->top_layer() + 1;
        }
 
-       if (_layer_display == Stacked || _layer_display == Expanded) {
+       if (_layer_display == Stacked) {
                update_contents_height ();
                update_coverage_frames ();
        } else {
@@ -324,23 +323,24 @@ StreamView::playlist_switched (boost::weak_ptr<Track> wtr)
        playlist_connections.drop_connections ();
        undisplay_track ();
 
+       /* draw it */
+
+       redisplay_track ();
+
        /* update layers count and the y positions and heights of our regions */
        _layers = tr->playlist()->top_layer() + 1;
        update_contents_height ();
        update_coverage_frames ();
 
-       /* draw it */
-
-       redisplay_track ();
-
        /* catch changes */
 
        tr->playlist()->LayeringChanged.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::playlist_layered, this, boost::weak_ptr<Track> (tr)), gui_context());
-       tr->playlist()->RegionAdded.connect (playlist_connections, invalidator (*this), ui_bind (&StreamView::add_region_view, this, _1), gui_context());
-       tr->playlist()->RegionRemoved.connect (playlist_connections, invalidator (*this), ui_bind (&StreamView::remove_region_view, this, _1), gui_context());
-       tr->playlist()->ContentsChanged.connect (playlist_connections, invalidator (*this), ui_bind (&StreamView::update_coverage_frames, this), gui_context());
+       tr->playlist()->RegionAdded.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::add_region_view, this, _1), gui_context());
+       tr->playlist()->RegionRemoved.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::remove_region_view, this, _1), gui_context());
+       tr->playlist()->ContentsChanged.connect (playlist_connections, invalidator (*this), boost::bind (&StreamView::update_coverage_frames, this), gui_context());
 }
 
+
 void
 StreamView::diskstream_changed ()
 {
@@ -546,7 +546,7 @@ StreamView::get_selectables (framepos_t start, framepos_t end, double top, doubl
                        layer_ok = (min_layer <= l && l <= max_layer);
                }
 
-               if ((*i)->region()->coverage (start, end) != OverlapNone && layer_ok) {
+               if ((*i)->region()->coverage (start, end) != Evoral::OverlapNone && layer_ok) {
                        results.push_back (*i);
                }
        }
@@ -574,7 +574,7 @@ StreamView::child_height () const
        case Expanded:
                return height / (_layers * 2 + 1);
        }
-
+       
        /* NOTREACHED */
        return height;
 }
@@ -613,6 +613,8 @@ StreamView::update_contents_height ()
                        break;
                }
        }
+
+       ContentsHeightChanged (); /* EMIT SIGNAL */
 }
 
 void