mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
a variety of fixes aimed at preventing crashes caused by the (global) port matrix (window) not really noticing that the session has gone away
git-svn-id: svn://localhost/ardour2/branches/3.0@13378 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
0ede2d0088
commit
204d840c43
2 changed files with 19 additions and 0 deletions
|
|
@ -62,6 +62,13 @@ ARDOUR_UI::set_session (Session *s)
|
||||||
{
|
{
|
||||||
SessionHandlePtr::set_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) {
|
if (!_session) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@ GlobalPortMatrix::GlobalPortMatrix (Gtk::Window* p, Session* s, DataType t)
|
||||||
void
|
void
|
||||||
GlobalPortMatrix::setup_ports (int dim)
|
GlobalPortMatrix::setup_ports (int dim)
|
||||||
{
|
{
|
||||||
|
if (!_session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_ports[dim].suspend_signals ();
|
_ports[dim].suspend_signals ();
|
||||||
_ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
|
_ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
|
||||||
_ports[dim].resume_signals ();
|
_ports[dim].resume_signals ();
|
||||||
|
|
@ -50,6 +54,10 @@ GlobalPortMatrix::setup_ports (int dim)
|
||||||
void
|
void
|
||||||
GlobalPortMatrix::set_state (BundleChannel c[2], bool s)
|
GlobalPortMatrix::set_state (BundleChannel c[2], bool s)
|
||||||
{
|
{
|
||||||
|
if (!_session) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
|
Bundle::PortList const & in_ports = c[IN].bundle->channel_ports (c[IN].channel);
|
||||||
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
|
Bundle::PortList const & out_ports = c[OUT].bundle->channel_ports (c[OUT].channel);
|
||||||
|
|
||||||
|
|
@ -178,6 +186,10 @@ void
|
||||||
GlobalPortMatrixWindow::set_session (Session* s)
|
GlobalPortMatrixWindow::set_session (Session* s)
|
||||||
{
|
{
|
||||||
_port_matrix.set_session (s);
|
_port_matrix.set_session (s);
|
||||||
|
|
||||||
|
if (!s) {
|
||||||
|
hide ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue