adjust plugin-UI height when toggling expanders
[ardour.git] / gtk2_ardour / tape_region_view.cc
index 62d37a9f7e7d6a3b0437e428a8c84e0afcf1bf05..214686e8ff3dd56f39ad3172b9f2d491328f7fe5 100644 (file)
@@ -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::Group *parent, RouteTimeAxisView &tv,
+TapeAudioRegionView::TapeAudioRegionView (ArdourCanvas::Container *parent, RouteTimeAxisView &tv,
                                          boost::shared_ptr<AudioRegion> 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 ();
+       }
 }