Fix restoration of connections to control surface ports.

git-svn-id: svn://localhost/ardour2/branches/3.0@9475 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-05-04 15:00:43 +00:00
parent 09c0014790
commit acd59c3439
3 changed files with 12 additions and 6 deletions

View File

@ -341,8 +341,6 @@ ARDOUR::init_post_engine ()
if ((node = Config->control_protocol_state()) != 0) {
ControlProtocolManager::instance().set_state (*node, Stateful::loading_state_version);
}
MIDI::Manager::instance()->set_port_states (Config->midi_port_states ());
}
int

View File

@ -63,6 +63,7 @@
#include "ardour/butler.h"
#include "ardour/click.h"
#include "ardour/configuration.h"
#include "ardour/control_protocol_manager.h"
#include "ardour/crossfade.h"
#include "ardour/cycle_timer.h"
#include "ardour/data_type.h"
@ -517,6 +518,17 @@ Session::when_engine_running ()
BootMessage (_("Setup signal flow and plugins"));
ControlProtocolManager::instance().set_session (this);
/* This must be done after the ControlProtocolManager set_session above,
as it will set states for ports which the ControlProtocolManager creates.
*/
MIDI::Manager::instance()->set_port_states (Config->midi_port_states ());
/* And this must be done after the MIDI::Manager::set_port_states as
* it will try to make connections whose details are loaded by set_port_states.
*/
hookup_io ();
if (_is_new && !no_auto_connect()) {

View File

@ -368,10 +368,6 @@ Session::second_stage_init ()
/* initial program change will be delivered later; see ::config_changed() */
BootMessage (_("Reset Control Protocols"));
ControlProtocolManager::instance().set_session (this);
_state_of_the_state = Clean;
Port::set_connecting_blocked (false);