Fix crossfade visibility on startup so that it respects the configured setting.
authorCarl Hetherington <carl@carlh.net>
Thu, 9 Sep 2010 01:38:02 +0000 (01:38 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 9 Sep 2010 01:38:02 +0000 (01:38 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7757 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/audio_streamview.cc
gtk2_ardour/crossfade_view.cc

index 1bf1855167d5d7f45be82f79fbdc75a8aa14d983..accc5b7ea4da2e4740939bc85ae90bfc7d795fbf 100644 (file)
@@ -61,7 +61,7 @@ using namespace Editing;
 AudioStreamView::AudioStreamView (AudioTimeAxisView& tv)
        : StreamView (tv)
 {
-       crossfades_visible = true;
+       crossfades_visible = tv.session()->config.get_xfades_visible ();
        color_handler ();
        _amplitude_above_axis = 1.0;
 
@@ -329,7 +329,7 @@ AudioStreamView::add_crossfade (boost::weak_ptr<Crossfade> wc)
        cv->set_valid (true);
        crossfade->Invalidated.connect (*this, invalidator (*this), ui_bind (&AudioStreamView::remove_crossfade, this, _1), gui_context());
        crossfade_views[cv->crossfade] = cv;
-       if (!_trackview.session()->config.get_xfades_visible() || !crossfades_visible) {
+       if (!crossfades_visible) {
                cv->hide ();
        }
 
@@ -795,8 +795,6 @@ AudioStreamView::update_contents_height ()
 void
 AudioStreamView::update_content_height (CrossfadeView* cv)
 {
-       cv->show ();
-
        if (_layer_display == Overlaid) {
 
                cv->set_y (0);
index 899ac3c917d51d528f7de37ef3fe24b1dcd1513a..bc8521dbc2c44c72fb5e33207ac54987230fb479 100644 (file)
@@ -185,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);
@@ -246,8 +246,9 @@ CrossfadeView::upper_regionview () const
 void
 CrossfadeView::show ()
 {
-       group->show();
        _visible = true;
+       group->show();
+       redraw_curves ();
 }
 
 void