summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/bundle_manager.cc2
-rw-r--r--gtk2_ardour/global_port_matrix.cc2
-rw-r--r--gtk2_ardour/io_selector.cc2
-rw-r--r--gtk2_ardour/port_group.cc14
-rw-r--r--gtk2_ardour/port_group.h2
-rw-r--r--gtk2_ardour/port_matrix.cc5
6 files changed, 19 insertions, 8 deletions
diff --git a/gtk2_ardour/bundle_manager.cc b/gtk2_ardour/bundle_manager.cc
index 0cd44af9a2..5940a62450 100644
--- a/gtk2_ardour/bundle_manager.cc
+++ b/gtk2_ardour/bundle_manager.cc
@@ -60,7 +60,7 @@ BundleEditorMatrix::setup_ports (int dim)
otherwise in some cases the basic system IO ports may be hidden, making
the bundle editor useless */
- _ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true);
+ _ports[OTHER].gather (_session, DataType::NIL, _bundle->ports_are_inputs(), true, show_only_bundles ());
_ports[OTHER].remove_bundle (_bundle);
_ports[OTHER].resume_signals ();
}
diff --git a/gtk2_ardour/global_port_matrix.cc b/gtk2_ardour/global_port_matrix.cc
index f4803f156b..f229a1a4ac 100644
--- a/gtk2_ardour/global_port_matrix.cc
+++ b/gtk2_ardour/global_port_matrix.cc
@@ -43,7 +43,7 @@ void
GlobalPortMatrix::setup_ports (int dim)
{
_ports[dim].suspend_signals ();
- _ports[dim].gather (_session, type(), dim == IN, false);
+ _ports[dim].gather (_session, type(), dim == IN, false, show_only_bundles ());
_ports[dim].resume_signals ();
}
diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc
index d7b65dc58b..19f25dcf1c 100644
--- a/gtk2_ardour/io_selector.cc
+++ b/gtk2_ardour/io_selector.cc
@@ -118,7 +118,7 @@ IOSelector::setup_ports (int dim)
if (dim == _other) {
- _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false);
+ _ports[_other].gather (_session, type(), _find_inputs_for_io_outputs, false, show_only_bundles ());
} else {
diff --git a/gtk2_ardour/port_group.cc b/gtk2_ardour/port_group.cc
index 5b5cdc0f52..863c29f243 100644
--- a/gtk2_ardour/port_group.cc
+++ b/gtk2_ardour/port_group.cc
@@ -321,9 +321,12 @@ public:
/** Gather ports from around the system and put them in this PortGroupList.
* @param type Type of ports to collect, or NIL for all types.
+ * @param use_session_bundles true to use the session's non-user bundles. Doing this will mean that
+ * hardware ports will be gathered into stereo pairs, as the session sets up bundles for these pairs.
+ * Not using the session bundles will mean that all hardware IO will be presented separately.
*/
void
-PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups)
+PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inputs, bool allow_dups, bool use_session_bundles)
{
clear ();
@@ -408,9 +411,12 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
}
}
- for (BundleList::iterator i = b->begin(); i != b->end(); ++i) {
- if (boost::dynamic_pointer_cast<UserBundle> (*i) == 0 && (*i)->ports_are_inputs() == inputs) {
- system->add_bundle (*i, allow_dups);
+ /* Only look for non-user bundles if instructed to do so */
+ if (use_session_bundles) {
+ for (BundleList::iterator i = b->begin(); i != b->end(); ++i) {
+ if (boost::dynamic_pointer_cast<UserBundle> (*i) == 0 && (*i)->ports_are_inputs() == inputs) {
+ system->add_bundle (*i, allow_dups);
+ }
}
}
diff --git a/gtk2_ardour/port_group.h b/gtk2_ardour/port_group.h
index 3e13c3a5e3..a9dfc1a4ad 100644
--- a/gtk2_ardour/port_group.h
+++ b/gtk2_ardour/port_group.h
@@ -107,7 +107,7 @@ class PortGroupList : public sigc::trackable
void add_group (boost::shared_ptr<PortGroup>);
void add_group_if_not_empty (boost::shared_ptr<PortGroup>);
- void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool);
+ void gather (ARDOUR::Session *, ARDOUR::DataType, bool, bool, bool);
PortGroup::BundleList const & bundles () const;
void clear ();
void remove_bundle (boost::shared_ptr<ARDOUR::Bundle>);
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index a259f357ce..fb7bca7946 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -623,6 +623,11 @@ PortMatrix::toggle_show_only_bundles ()
_show_only_bundles = !_show_only_bundles;
setup ();
+
+ /* The way in which hardware ports are grouped changes depending on the _show_only_bundles
+ setting, so we need to set things up again now.
+ */
+ setup_all_ports ();
}
pair<uint32_t, uint32_t>