From 11415b49be02f16495c95d6286c485ac8afc5189 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 27 Jun 2012 22:57:06 +0000 Subject: first pass at the big rethink of managing sort order keys for editor and mixer. this appears to work, but remote control IDs are not yet correct (frequently off by one because of the presence of the master bus in the editor) git-svn-id: svn://localhost/ardour2/branches/3.0@12953 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'gtk2_ardour/port_matrix.cc') diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index 40c48b2345..8db2dad475 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -157,7 +157,7 @@ PortMatrix::init () _session->engine().PortRegisteredOrUnregistered.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); /* watch for route order keys changing, which changes the order of things in our global ports list(s) */ - _session->RouteOrderKeyChanged.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports_proxy, this), gui_context()); + Route::SyncOrderKeys.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports_proxy, this, _1), gui_context()); /* Part 3: other stuff */ @@ -598,13 +598,15 @@ PortMatrix::setup_global_ports () } void -PortMatrix::setup_global_ports_proxy () +PortMatrix::setup_global_ports_proxy (RouteSortOrderKey sk) { - /* Avoid a deadlock by calling this in an idle handler: see IOSelector::io_changed_proxy - for a discussion. - */ - - Glib::signal_idle().connect_once (sigc::mem_fun (*this, &PortMatrix::setup_global_ports)); + if (sk == EditorSort) { + /* Avoid a deadlock by calling this in an idle handler: see IOSelector::io_changed_proxy + for a discussion. + */ + + Glib::signal_idle().connect_once (sigc::mem_fun (*this, &PortMatrix::setup_global_ports)); + } } void -- cgit v1.2.3