diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-09 15:50:44 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-10-09 15:50:44 +0000 |
commit | 0d0f71ee92fb7ce53fbcb8c7b0cd93b1cdf3529f (patch) | |
tree | ae37075200040cbbd430b98ee3cbce59eaef51ca /gtk2_ardour/streamview.cc | |
parent | 8011cbf5f8e4181ac39e4140e681fcad531f4a7c (diff) |
fix abort-capture path, including many subtle issues with shared_ptr<>; remove old automation feedback code; make new automation feedback code slightly configurable ; fix zoom focus options for playhead + edit cursor ; prevent zoom < 2 samples per pixel to avoid crashes ; peak building now uses shared_ptr<Source> not Source*
git-svn-id: svn://localhost/ardour2/trunk@959 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/streamview.cc')
-rw-r--r-- | gtk2_ardour/streamview.cc | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 097e581cdf..0a35709538 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -164,9 +164,11 @@ StreamView::add_region_view (boost::shared_ptr<Region> r) } void -StreamView::remove_region_view (boost::shared_ptr<Region> r) +StreamView::remove_region_view (boost::weak_ptr<Region> weak_r) { - ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), r)); + ENSURE_GUI_THREAD (bind (mem_fun (*this, &StreamView::remove_region_view), weak_r)); + + boost::shared_ptr<Region> r (weak_r.lock()); for (list<RegionView *>::iterator i = region_views.begin(); i != region_views.end(); ++i) { if (((*i)->region()) == r) { @@ -177,27 +179,6 @@ StreamView::remove_region_view (boost::shared_ptr<Region> r) } } -#if 0 -(unused) -void -StreamView::remove_rec_region (boost::shared_ptr<Region> r) -{ - ENSURE_GUI_THREAD(bind (mem_fun (*this, &StreamView::remove_rec_region), r)); - - if (!Gtkmm2ext::UI::instance()->caller_is_ui_thread()) { - fatal << "region deleted from non-GUI thread!" << endmsg; - /*NOTREACHED*/ - } - - for (list<boost::shared_ptr<Region> >::iterator i = rec_regions.begin(); i != rec_regions.end(); ++i) { - if (*i == r) { - rec_regions.erase (i); - break; - } - } -} -#endif - void StreamView::undisplay_diskstream () { |