fix/workaround window-proxy session-management
The window proxy defers construction of classes. set_session() is called before the instances are available. the proxy-manager only calls set_session() for SessionHandlePtr but not the class-specific method.. fixes http://tracker.ardour.org/view.php?id=5566
This commit is contained in:
parent
539e58bf5d
commit
3c6ff2f02f
@ -188,13 +188,13 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
, add_route_dialog (X_("add-routes"), _("Add Tracks/Busses"))
|
||||
, about (X_("about"), _("About"))
|
||||
, location_ui (X_("locations"), _("Locations"))
|
||||
, route_params (X_("inspector"), _("Tracks and Busses"))
|
||||
, session_option_editor (X_("session-options-editor"), _("Properties"), boost::bind (&ARDOUR_UI::create_session_option_editor, this))
|
||||
, add_video_dialog (X_("add-video"), _("Add Tracks/Busses"), boost::bind (&ARDOUR_UI::create_add_video_dialog, this))
|
||||
, bundle_manager (X_("bundle-manager"), _("Bundle Manager"), boost::bind (&ARDOUR_UI::create_bundle_manager, this))
|
||||
, big_clock_window (X_("big-clock"), _("Big Clock"), boost::bind (&ARDOUR_UI::create_big_clock_window, this))
|
||||
, audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO))
|
||||
, midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI))
|
||||
, route_params (X_("inspector"), _("Tracks and Busses"), boost::bind (&ARDOUR_UI::create_route_params_window, this))
|
||||
|
||||
, error_log_button (_("Errors"))
|
||||
|
||||
@ -363,6 +363,18 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
and its functionality are separate
|
||||
*/
|
||||
|
||||
if (audio_port_matrix) {
|
||||
audio_port_matrix->set_session (_session);
|
||||
}
|
||||
|
||||
if (midi_port_matrix) {
|
||||
midi_port_matrix->set_session (_session);
|
||||
}
|
||||
|
||||
if (route_params) {
|
||||
route_params->set_session (_session);
|
||||
}
|
||||
|
||||
(void) theme_manager.get (true);
|
||||
|
||||
starting.connect (sigc::mem_fun(*this, &ARDOUR_UI::startup));
|
||||
|
@ -579,7 +579,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
WM::Proxy<AddRouteDialog> add_route_dialog;
|
||||
WM::Proxy<About> about;
|
||||
WM::Proxy<LocationUIWindow> location_ui;
|
||||
WM::Proxy<RouteParams_UI> route_params;
|
||||
|
||||
/* Windows/Dialogs that require a creator method */
|
||||
|
||||
@ -589,6 +588,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
WM::ProxyWithConstructor<BigClockWindow> big_clock_window;
|
||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> audio_port_matrix;
|
||||
WM::ProxyWithConstructor<GlobalPortMatrixWindow> midi_port_matrix;
|
||||
WM::ProxyWithConstructor<RouteParams_UI> route_params;
|
||||
|
||||
/* creator methods */
|
||||
|
||||
@ -597,6 +597,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
||||
AddVideoDialog* create_add_video_dialog ();
|
||||
BigClockWindow* create_big_clock_window();
|
||||
GlobalPortMatrixWindow* create_global_port_matrix (ARDOUR::DataType);
|
||||
RouteParams_UI* create_route_params_window ();
|
||||
|
||||
static UIConfiguration *ui_config;
|
||||
|
||||
|
@ -73,6 +73,9 @@ ARDOUR_UI::set_session (Session *s)
|
||||
midi_port_matrix->set_session (s);
|
||||
}
|
||||
|
||||
if (route_params) {
|
||||
route_params->set_session (s);
|
||||
}
|
||||
|
||||
if (!_session) {
|
||||
/* Session option editor cannot exist across change-of-session */
|
||||
@ -222,6 +225,9 @@ ARDOUR_UI::unload_session (bool hide_stuff)
|
||||
editor->hide ();
|
||||
mixer->hide ();
|
||||
theme_manager->hide ();
|
||||
audio_port_matrix->hide();
|
||||
midi_port_matrix->hide();
|
||||
route_params->hide();
|
||||
}
|
||||
|
||||
second_connection.disconnect ();
|
||||
@ -447,6 +453,14 @@ ARDOUR_UI::create_big_clock_window ()
|
||||
return new BigClockWindow (*big_clock);
|
||||
}
|
||||
|
||||
RouteParams_UI*
|
||||
ARDOUR_UI::create_route_params_window ()
|
||||
{
|
||||
RouteParams_UI *rv = new RouteParams_UI ();
|
||||
rv->set_session(_session);
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
ARDOUR_UI::handle_locations_change (Location *)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user