Set up piano roll and scroomer objects before the MidiTimeAxisView height gets set...
[ardour.git] / gtk2_ardour / panner_ui.cc
index 627d4e76aaa98d5435852a8b78b0a62abb55a563..6c594b4260e7f02416ac2b43fb1feeebc3ea5239 100644 (file)
@@ -144,7 +144,10 @@ PannerUI::build_astate_menu ()
                pan_astate_menu->items().clear ();
        }
 
-       pan_astate_menu->items().push_back (MenuElem (_("Manual"), sigc::bind (
+       /** TRANSLATORS: this is `Manual' in the sense of automation not being played,
+           so that changes to pan must be done by hand.
+       */
+       pan_astate_menu->items().push_back (MenuElem (S_("Automation|Manual"), sigc::bind (
                        sigc::mem_fun (_panner.get(), &Panner::set_automation_state),
                        (AutoState) Off)));
        pan_astate_menu->items().push_back (MenuElem (_("Play"), sigc::bind (
@@ -219,14 +222,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 +241,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 */