consolidate BundleAdded/Remove signal
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.
This commit is contained in:
parent
9107a4b7fe
commit
0582221353
@ -716,12 +716,11 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
|
||||
/* 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 ();
|
||||
|
||||
|
@ -4129,7 +4129,7 @@ Session::available_capture_duration ()
|
||||
}
|
||||
|
||||
void
|
||||
Session::add_bundle (boost::shared_ptr<Bundle> bundle)
|
||||
Session::add_bundle (boost::shared_ptr<Bundle> bundle, bool emit_signal)
|
||||
{
|
||||
{
|
||||
RCUWriter<BundleList> writer (_bundles);
|
||||
@ -4137,7 +4137,9 @@ Session::add_bundle (boost::shared_ptr<Bundle> bundle)
|
||||
b->push_back (bundle);
|
||||
}
|
||||
|
||||
BundleAdded (bundle); /* EMIT SIGNAL */
|
||||
if (emit_signal) {
|
||||
BundleAddedOrRemoved (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
set_dirty();
|
||||
}
|
||||
@ -4159,7 +4161,7 @@ Session::remove_bundle (boost::shared_ptr<Bundle> bundle)
|
||||
}
|
||||
|
||||
if (removed) {
|
||||
BundleRemoved (bundle); /* EMIT SIGNAL */
|
||||
BundleAddedOrRemoved (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
set_dirty();
|
||||
|
Loading…
Reference in New Issue
Block a user