diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-05-13 21:34:09 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-05-13 21:34:09 +0000 |
commit | 0569107ddc0d2a8df6ca0a2c8cc16ebe8f3dee99 (patch) | |
tree | 81b0a6ffb5cd967d3b205a11ad6d4f8726aa03d2 /gtk2_ardour/streamview.cc | |
parent | 7188ec39903e4cef049468c5a0583d9ec67a290d (diff) |
more work on the new all-Processor-all-The-Time redesign of Route - LOTS OF BREAKAGE STILL EXPECTED ; change all(?) methods that pass a start/end frame in to use sframes_t not nframes_t
git-svn-id: svn://localhost/ardour2/branches/3.0@5074 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/streamview.cc')
-rw-r--r-- | gtk2_ardour/streamview.cc | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 6425b84c27..2127d1354c 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -169,9 +169,19 @@ StreamView::set_samples_per_unit (gdouble spp) } void +StreamView::add_region_view_weak (boost::weak_ptr<Region> r) +{ + boost::shared_ptr<Region> sp (r.lock()); + + if (sp) { + add_region_view (sp); + } +} + +void StreamView::add_region_view (boost::shared_ptr<Region> r) { - // ENSURE_GUI_THREAD (bind (mem_fun (*this, &AudioStreamView::add_region_view), r)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::add_region_view), r)); add_region_view_internal (r, true); if (_layer_display == Stacked) { @@ -284,6 +294,7 @@ void StreamView::playlist_modified_weak (boost::weak_ptr<Diskstream> ds) { boost::shared_ptr<Diskstream> sp (ds.lock()); + if (sp) { playlist_modified (sp); } @@ -300,7 +311,7 @@ StreamView::playlist_modified (boost::shared_ptr<Diskstream> ds) _layers = ds->playlist()->top_layer() + 1; update_contents_height (); update_coverage_frames (); - redisplay_diskstream (); + //redisplay_diskstream (); } } @@ -342,8 +353,13 @@ StreamView::playlist_changed (boost::shared_ptr<Diskstream> ds) /* catch changes */ playlist_connections.push_back (ds->playlist()->Modified.connect (bind ( - mem_fun (*this, &StreamView::playlist_modified_weak), - ds))); + mem_fun (*this, &StreamView::playlist_modified_weak), ds))); + + playlist_connections.push_back (ds->playlist()->RegionAdded.connect ( + mem_fun (*this, &StreamView::add_region_view_weak))); + + playlist_connections.push_back (ds->playlist()->RegionRemoved.connect ( + mem_fun (*this, &StreamView::remove_region_view))); } void |