X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Ftape_region_view.cc;h=214686e8ff3dd56f39ad3172b9f2d491328f7fe5;hb=42b20f15a2e5d751582f4c467ffcbcbc9b71a59c;hp=6de7b65327149e9e0adf2ec051a641ef443aed27;hpb=0796ccfb652dd31ea1d94526e0e6d92863a972b0;p=ardour.git diff --git a/gtk2_ardour/tape_region_view.cc b/gtk2_ardour/tape_region_view.cc index 6de7b65327..214686e8ff 100644 --- a/gtk2_ardour/tape_region_view.cc +++ b/gtk2_ardour/tape_region_view.cc @@ -31,7 +31,7 @@ #include "audio_time_axis.h" #include "gui_thread.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace ARDOUR; using namespace PBD; @@ -46,7 +46,7 @@ const TimeAxisViewItem::Visibility TapeAudioRegionView::default_tape_visibility TimeAxisViewItem::HideFrameRight | TimeAxisViewItem::FullWidthNameHighlight); -TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Layout *parent, RouteTimeAxisView &tv, +TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Container *parent, RouteTimeAxisView &tv, boost::shared_ptr r, double spu, uint32_t basic_color) @@ -82,12 +82,23 @@ void TapeAudioRegionView::update (uint32_t /*n*/) { /* check that all waves are build and ready */ - if (!tmp_waves.empty()) { return; } ENSURE_GUI_THREAD (*this, &TapeAudioRegionView::update, n); // CAIROCANVAS - // waves[n]->rebuild (); + + /* this is a quick hack to draw something (abuse gain_changed to force + * an image-cache invalidation. + * + * TODO: ArdourCanvas::WaveView needs an API to look up the specific channel "n" + * and a special case to not only invalidate the cache but re-expose the + * waveform. e.g. + * + * waves[m]->rebuild(); // where 'm' corresponds to channel 'n'. + */ + for (uint32_t i = 0; i < waves.size(); ++i) { + waves[i]->gain_changed (); + } }