Fix a few dialogues which don't reset their session pointer correctly on a new sessio...
authorCarl Hetherington <carl@carlh.net>
Tue, 20 Jul 2010 17:56:02 +0000 (17:56 +0000)
committerCarl Hetherington <carl@carlh.net>
Tue, 20 Jul 2010 17:56:02 +0000 (17:56 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7451 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui_dialogs.cc
gtk2_ardour/editor.cc
gtk2_ardour/global_port_matrix.cc
gtk2_ardour/global_port_matrix.h

index 096f8ac730646ba8cedb1891b8aa7c5a3571fcdd..c187a5df56be3f459a24ba3eba0590c44f133fad 100644 (file)
@@ -40,6 +40,7 @@
 #include "keyeditor.h"
 #include "gui_thread.h"
 #include "midi_tracer.h"
+#include "add_route_dialog.h"
 
 #include "i18n.h"
 
@@ -66,6 +67,14 @@ ARDOUR_UI::set_session (Session *s)
                route_params->set_session (s);
        }
 
+       if (add_route_dialog) {
+               add_route_dialog->set_session (s);
+       }
+
+       if (session_option_editor) {
+               session_option_editor->set_session (s);
+       }
+
        primary_clock.set_session (s);
        secondary_clock.set_session (s);
        big_clock.set_session (s);
index 76bcd39ee22682faea6f775b52147bb3b9824e91..42b1a99fc5a29ed0d935b338519807a935c96f51 100644 (file)
@@ -1076,6 +1076,12 @@ Editor::set_session (Session *t)
                sfbrowser->set_session (_session);
        }
 
+       for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) {
+               if (_global_port_matrix[*i]) {
+                       _global_port_matrix[*i]->set_session (_session);
+               }
+       }
+
        compute_fixed_ruler_scale ();
 
        /* there are never any selected regions at startup */
index 49e26732639a286c12b53aeb9abcafa0d97bd7b2..98760c863e915881a4c51a33b3aea96c00fcd609 100644 (file)
@@ -166,6 +166,12 @@ GlobalPortMatrixWindow::on_show ()
        resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
 }
 
+void
+GlobalPortMatrixWindow::set_session (ARDOUR::Session* s)
+{
+       _port_matrix.set_session (s);
+}
+
 string
 GlobalPortMatrix::disassociation_verb () const
 {
index 0ce77f74c3d9e35a2ca97bf14ef89e4447171324..734c2ff60944b38f2847cb58c986781d34b19e16 100644 (file)
@@ -56,6 +56,8 @@ class GlobalPortMatrixWindow : public Gtk::Window
 public:
        GlobalPortMatrixWindow (ARDOUR::Session *, ARDOUR::DataType);
 
+       void set_session (ARDOUR::Session *);
+
 private:
        void on_show ();