X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fardour_ui_dialogs.cc;h=02c72d723066f081fcdb8567ef0320176c2bc656;hb=82be348d429b97f3e223b3a5b1c6807d23fcdaa0;hp=bb3887862d7f43770fc1f493625032f43dd44d91;hpb=cd2047cbffc5e0270acab555364bb9d958fe7927;p=ardour.git diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index bb3887862d..02c72d7230 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -25,6 +25,7 @@ #include "ardour/session.h" #include "ardour/audioengine.h" +#include "ardour/automation_watch.h" #include "actions.h" #include "add_route_dialog.h" @@ -35,6 +36,7 @@ #include "gui_thread.h" #include "keyeditor.h" #include "location_ui.h" +#include "main_clock.h" #include "midi_tracer.h" #include "mixer_ui.h" #include "public_editor.h" @@ -60,6 +62,13 @@ ARDOUR_UI::set_session (Session *s) { SessionHandlePtr::set_session (s); + for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) { + GlobalPortMatrixWindow* w; + if ((w = _global_port_matrix[*i]->get()) != 0) { + w->set_session (s); + } + } + if (!_session) { return; } @@ -76,6 +85,8 @@ ARDOUR_UI::set_session (Session *s) } } + AutomationWatch::instance().set_session (s); + if (location_ui->get()) { location_ui->get()->set_session(s); } @@ -161,15 +172,15 @@ ARDOUR_UI::set_session (Session *s) _session->TransportStateChange.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::map_transport_state, this), gui_context()); _session->DirtyChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::update_autosave, this), gui_context()); - _session->Xrun.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::xrun_handler, this, _1), gui_context()); - _session->SoloActive.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::soloing_changed, this, _1), gui_context()); - _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::auditioning_changed, this, _1), gui_context()); - _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); - _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); - _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, ui_bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ()); + _session->Xrun.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::xrun_handler, this, _1), gui_context()); + _session->SoloActive.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::soloing_changed, this, _1), gui_context()); + _session->AuditionActive.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::auditioning_changed, this, _1), gui_context()); + _session->locations()->added.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); + _session->locations()->removed.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::handle_locations_change, this, _1), gui_context()); + _session->config.ParameterChanged.connect (_session_connections, MISSING_INVALIDATOR, boost::bind (&ARDOUR_UI::session_parameter_changed, this, _1), gui_context ()); #ifdef HAVE_JACK_SESSION - engine->JackSessionEvent.connect (*_session, MISSING_INVALIDATOR, ui_bind (&Session::jack_session_event, _session, _1), gui_context()); + engine->JackSessionEvent.connect (*_session, MISSING_INVALIDATOR, boost::bind (&Session::jack_session_event, _session, _1), gui_context()); #endif /* Clocks are on by default after we are connected to a session, so show that here. @@ -242,6 +253,8 @@ ARDOUR_UI::unload_session (bool hide_stuff) delete _session; _session = 0; + session_loaded = false; + update_buffer_load (); return 0;