Remove panner altogether, if necessary, when setting up PannerUI. Also reset a mixer...
authorCarl Hetherington <carl@carlh.net>
Fri, 18 Nov 2011 00:22:31 +0000 (00:22 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 18 Nov 2011 00:22:31 +0000 (00:22 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10668 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/mixer_strip.cc
gtk2_ardour/panner_ui.cc

index 5d018a4251cc00c277cc6f9eae223a895c2d9771..18f65d78802dc4c8cdf1c6d3903a552390075b92 100644 (file)
@@ -545,6 +545,8 @@ MixerStrip::set_route (boost::shared_ptr<Route> rt)
                hide_button.show();
        }
 
+       gpm.reset_peak_display ();
+
        width_button.show();
        width_hide_box.show();
        whvbox.show ();
index 627d4e76aaa98d5435852a8b78b0a62abb55a563..c086ce177ca5fd83b1ae6b39ac7ee5f53eef6e7a 100644 (file)
@@ -219,14 +219,10 @@ PannerUI::panshell_changed ()
 void
 PannerUI::setup_pan ()
 {
-       if (!_panner) {
-               return;
-       }
-
-       uint32_t const nouts = _panner->out().n_audio();
-       uint32_t const nins = _panner->in().n_audio();
+       int const nouts = _panner ? _panner->out().n_audio() : -1;
+       int const nins = _panner ? _panner->in().n_audio() : -1;
 
-       if (int32_t (nouts) == _current_nouts && int32_t (nins) == _current_nins) {
+       if (nouts == _current_nouts && nins == _current_nins) {
                return;
        }
 
@@ -242,6 +238,10 @@ PannerUI::setup_pan ()
        delete _mono_panner;
        _mono_panner = 0;
 
+       if (!_panner) {
+               return;
+       }
+
        if (nouts == 0 || nouts == 1) {
 
                /* stick something into the panning viewport so that it redraws */