Use global clip level from prefs. Restore clip colour, \
[ardour.git] / gtk2_ardour / tape_region_view.cc
index 6fd2570c2783ee4fe53fcfe5a7c7a77d0c7cf285..d626f3df496880fb12bf127e929855811841b83d 100644 (file)
 
 #include <gtkmm2ext/gtk_ui.h>
 
-#include "ardour/playlist.h"
 #include "ardour/audioregion.h"
 #include "ardour/audiosource.h"
-#include "ardour/audio_diskstream.h"
 
 #include "tape_region_view.h"
 #include "audio_time_axis.h"
@@ -71,7 +69,7 @@ TapeAudioRegionView::init (Gdk::Color const & basic_color, bool /*wfw*/)
        /* every time the wave data changes and peaks are ready, redraw */
 
        for (uint32_t n = 0; n < audio_region()->n_channels(); ++n) {
-               audio_region()->audio_source(n)->PeaksReady.connect (*this, boost::bind (&TapeAudioRegionView::update, this, n));
+               audio_region()->audio_source(n)->PeaksReady.connect (*this, invalidator (*this), boost::bind (&TapeAudioRegionView::update, this, n), gui_context());
        }
 
 }
@@ -81,7 +79,7 @@ TapeAudioRegionView::~TapeAudioRegionView()
 }
 
 void
-TapeAudioRegionView::update (uint32_t n)
+TapeAudioRegionView::update (uint32_t /*n*/)
 {
        /* check that all waves are build and ready */
 
@@ -89,11 +87,9 @@ TapeAudioRegionView::update (uint32_t n)
                return;
        }
 
-       ENSURE_GUI_THREAD (*this, &TapeAudioRegionView::update, n)
-
-       /* this triggers a cache invalidation and redraw in the waveview */
-
-       waves[n]->property_data_src() = _region.get();
+       ENSURE_GUI_THREAD (*this, &TapeAudioRegionView::update, n);
+       // CAIROCANVAS
+       // waves[n]->rebuild ();
 }
 
 void