Don't offer inputs to things as possible output connections, and vice versa (part...
authorCarl Hetherington <carl@carlh.net>
Thu, 3 Nov 2011 03:04:51 +0000 (03:04 +0000)
committerCarl Hetherington <carl@carlh.net>
Thu, 3 Nov 2011 03:04:51 +0000 (03:04 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10410 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/mixer_strip.cc
libs/ardour/ardour/bundle.h
libs/ardour/bundle.cc

index 46f084efab44ad329898c2d248cb23398207037b..70c8a7ae8efe82306bcf4fe0f6bc49cbed93d962 100644 (file)
@@ -884,7 +884,7 @@ MixerStrip::maybe_add_bundle_to_input_menu (boost::shared_ptr<Bundle> b, ARDOUR:
 {
        using namespace Menu_Helpers;
 
-       if (b->ports_are_outputs() == false || b->nchannels() != _route->n_inputs()) {
+       if (b->ports_are_outputs() == false || b->nchannels() != _route->n_inputs() || *b == *_route->output()->bundle()) {
                return;
        }
 
@@ -918,7 +918,7 @@ MixerStrip::maybe_add_bundle_to_output_menu (boost::shared_ptr<Bundle> b, ARDOUR
 {
        using namespace Menu_Helpers;
 
-       if (b->ports_are_inputs() == false || b->nchannels() != _route->n_outputs()) {
+       if (b->ports_are_inputs() == false || b->nchannels() != _route->n_outputs() || *b == *_route->input()->bundle()) {
                return;
        }
 
index e3d56f22f56c618ff107c7656766d176f45e6650..6b8586a46a7ee78fab7bed28e923340e99d0cb76 100644 (file)
@@ -114,6 +114,8 @@ class Bundle : public PBD::ScopedConnectionList
        void suspend_signals ();
        void resume_signals ();
 
+       bool operator== (Bundle const & other);
+
        /** Things that might change about this bundle */
        enum Change {
                NameChanged = 0x1, ///< the bundle name or a channel name has changed
index 1948024d91f7b1bc0100382529844eafaea653a7..d8666c5bbba8d9d5424085185b9e4dc1bec09780 100644 (file)
@@ -511,3 +511,9 @@ operator<< (ostream& os, Bundle const & b)
 
        return os;
 }
+
+bool
+Bundle::operator== (Bundle const & other)
+{
+       return _channel == other._channel;
+}