merge exportvis branch into cairocanvas, to reduce the number of "floating" branches.
[ardour.git] / libs / ardour / session.cc
index 9e79ad305aa6c369674d16588d58e19085a48299..40123e06702b0be5678d44c2de96c24635926ea8 100644 (file)
@@ -257,6 +257,7 @@ Session::Session (AudioEngine &eng,
        , _step_editors (0)
        , _suspend_timecode_transmission (0)
        ,  _speakers (new Speakers)
+       , _order_hint (0)
        , ignore_route_processor_changes (false)
        , _midi_ports (0)
        , _mmc (0)
@@ -558,10 +559,10 @@ Session::setup_ltc ()
 {
        XMLNode* child = 0;
        
-       _ltc_input.reset (new IO (*this, _("LTC In"), IO::Input));
-       _ltc_output.reset (new IO (*this, _("LTC Out"), IO::Output));
+       _ltc_input.reset (new IO (*this, X_("LTC In"), IO::Input));
+       _ltc_output.reset (new IO (*this, X_("LTC Out"), IO::Output));
        
-       if (state_tree && (child = find_named_node (*state_tree->root(), "LTC-In")) != 0) {
+       if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC In"))) != 0) {
                _ltc_input->set_state (*(child->children().front()), Stateful::loading_state_version);
        } else {
                {
@@ -571,7 +572,7 @@ Session::setup_ltc ()
                reconnect_ltc_input ();
        }
        
-       if (state_tree && (child = find_named_node (*state_tree->root(), "LTC-Out")) != 0) {
+       if (state_tree && (child = find_named_node (*state_tree->root(), X_("LTC Out"))) != 0) {
                _ltc_output->set_state (*(child->children().front()), Stateful::loading_state_version);
        } else {
                {
@@ -585,15 +586,15 @@ Session::setup_ltc ()
         * IO style of NAME/TYPE-{in,out}N
         */
        
-       _ltc_input->nth (0)->set_name (_("LTC-in"));
-       _ltc_output->nth (0)->set_name (_("LTC-out"));
+       _ltc_input->nth (0)->set_name (X_("LTC-in"));
+       _ltc_output->nth (0)->set_name (X_("LTC-out"));
 }
 
 void
 Session::setup_click ()
 {
        _clicking = false;
-       _click_io.reset (new ClickIO (*this, "click"));
+       _click_io.reset (new ClickIO (*this, X_("Click")));
        _click_gain.reset (new Amp (*this));
        _click_gain->activate ();
        if (state_tree) {
@@ -2335,6 +2336,11 @@ Session::add_routes_inner (RouteList& new_routes, bool input_auto_connect, bool
         ChanCount existing_outputs;
        uint32_t order = next_control_id();
 
+       if (_order_hint != 0) {
+               order = _order_hint;
+               _order_hint = 0;
+       }
+
         count_existing_track_channels (existing_inputs, existing_outputs);
 
        {