port cairo ARGB/BGRA -> pixbuf RGBA patch from recent 2.X commit (restores text on...
[ardour.git] / gtk2_ardour / crossfade_view.cc
index 4743c87ce4d237f649351d43387927ef330410ae..bc8521dbc2c44c72fb5e33207ac54987230fb479 100644 (file)
@@ -52,7 +52,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
 
 
        : TimeAxisViewItem ("xfade" /*xf.name()*/, *parent, tv, spu, basic_color, xf->position(),
-                           xf->length(), false, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowFrame)),
+                           xf->length(), false, false, TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowFrame)),
          crossfade (xf),
          left_view (lview),
          right_view (rview)    
@@ -84,6 +84,7 @@ CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
        crossfade_changed (all_crossfade_properties);
 
        crossfade->PropertyChanged.connect (*this, invalidator (*this), ui_bind (&CrossfadeView::crossfade_changed, this, _1), gui_context());
+       crossfade->FadesChanged.connect (*this, invalidator (*this), ui_bind (&CrossfadeView::crossfade_fades_changed, this), gui_context());
        ColorsChanged.connect (sigc::mem_fun (*this, &CrossfadeView::color_handler));
 }
 
@@ -184,7 +185,7 @@ CrossfadeView::redraw_curves ()
                p.set_x (i + 1);
                p.set_y (_height - ((_height - 2) * vec[i]));
        }
-       
+
        fade_in->property_points() = *points;
 
        crossfade->fade_out().curve().get_vector (0, crossfade->length(), vec, npoints);
@@ -245,8 +246,9 @@ CrossfadeView::upper_regionview () const
 void
 CrossfadeView::show ()
 {
-       group->show();
        _visible = true;
+       group->show();
+       redraw_curves ();
 }
 
 void
@@ -261,3 +263,9 @@ CrossfadeView::fake_hide ()
 {
        group->hide();
 }
+
+void
+CrossfadeView::crossfade_fades_changed ()
+{
+       redraw_curves ();
+}