From 9213e9c9094468ce21be378ea017b0da1405bf03 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 22 Apr 2010 01:40:33 +0000 Subject: Allow more than one peaks_ready callback to be pending for an AudioRegionView at any one time. Prevents problems when there is more than 1 channel for which peaks are not ready; before, the first peaks_ready callback would be forgotten when the second one was requested. Should fix #3074. git-svn-id: svn://localhost/ardour2/branches/3.0@6951 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/strip_silence_dialog.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'gtk2_ardour/strip_silence_dialog.cc') diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index f5ecdef426..0403d4d188 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -56,6 +56,7 @@ StripSilenceDialog::StripSilenceDialog (Session* s, std::list::iterator i = _waves.begin(); i != _waves.end(); ++i) { - if (i->region->audio_source(0)->peaks_ready (boost::bind (&StripSilenceDialog::peaks_ready, this), _peaks_ready_connection, gui_context())) { + if (i->region->audio_source(0)->peaks_ready (boost::bind (&StripSilenceDialog::peaks_ready, this), &_peaks_ready_connection, gui_context())) { i->view = new WaveView (*(_canvas->root())); i->view->property_data_src() = static_cast(i->region.get()); i->view->property_cache() = WaveView::create_cache (); @@ -182,7 +188,8 @@ StripSilenceDialog::create_waves () void StripSilenceDialog::peaks_ready () { - _peaks_ready_connection.disconnect (); + delete _peaks_ready_connection; + _peaks_ready_connection = 0; create_waves (); } -- cgit v1.2.3