The only user (matrix) does not care which bundles are added/removed.
This simplification will make it a lot easier to keep bundles
in sync with actual hardware ports.
/* I/O bundles */
- void add_bundle (boost::shared_ptr<Bundle>);
+ void add_bundle (boost::shared_ptr<Bundle>, bool emit_signal = true);
void remove_bundle (boost::shared_ptr<Bundle>);
boost::shared_ptr<Bundle> bundle_by_name (std::string) const;
- PBD::Signal1<void,boost::shared_ptr<Bundle> > BundleAdded;
- PBD::Signal1<void,boost::shared_ptr<Bundle> > BundleRemoved;
+ PBD::Signal0<void> BundleAddedOrRemoved;
void midi_panic ();
}
void
-Session::add_bundle (boost::shared_ptr<Bundle> bundle)
+Session::add_bundle (boost::shared_ptr<Bundle> bundle, bool emit_signal)
{
{
RCUWriter<BundleList> writer (_bundles);
b->push_back (bundle);
}
- BundleAdded (bundle); /* EMIT SIGNAL */
+ if (emit_signal) {
+ BundleAddedOrRemoved (); /* EMIT SIGNAL */
+ }
set_dirty();
}
}
if (removed) {
- BundleRemoved (bundle); /* EMIT SIGNAL */
+ BundleAddedOrRemoved (); /* EMIT SIGNAL */
}
set_dirty();