mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
use drop_and_kill() when connecting Commands to their dependents
This commit is contained in:
parent
210f58ddb7
commit
751dea75d3
2 changed files with 8 additions and 4 deletions
|
|
@ -171,8 +171,8 @@ class /*LIBPBD_API*/ SequenceProperty : public PropertyBase
|
|||
with this diff().
|
||||
*/
|
||||
|
||||
for (typename ChangeContainer::const_iterator i = a->changes().added.begin(); i != a->changes().added.end(); ++i) {
|
||||
(*i)->DropReferences.connect_same_thread (*cmd, std::bind (&Destructible::drop_references, cmd));
|
||||
for (auto const & change : a->changes().added) {
|
||||
change->DropReferences.connect_same_thread (*cmd, std::bind (Destructible::drop_and_kill, cmd));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,9 @@ StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr<StatefulDestructible>
|
|||
be sure to notify owners of this command.
|
||||
*/
|
||||
|
||||
s->DropReferences.connect_same_thread (*this, std::bind (&Destructible::drop_references, this));
|
||||
if (!_changes || _changes->empty()) {
|
||||
s->DropReferences.connect_same_thread (*this, std::bind (Destructible::drop_and_kill, this));
|
||||
}
|
||||
}
|
||||
|
||||
StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr<StatefulDestructible> s, XMLNode const& n)
|
||||
|
|
@ -63,7 +65,9 @@ StatefulDiffCommand::StatefulDiffCommand (std::shared_ptr<StatefulDestructible>
|
|||
be sure to notify owners of this command.
|
||||
*/
|
||||
|
||||
s->DropReferences.connect_same_thread (*this, std::bind (&Destructible::drop_references, this));
|
||||
if (_changes->empty()) {
|
||||
s->DropReferences.connect_same_thread (*this, std::bind (Destructible::drop_and_kill, this));
|
||||
}
|
||||
}
|
||||
|
||||
StatefulDiffCommand::~StatefulDiffCommand ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue