diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-27 22:23:59 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-27 22:23:59 +0100 |
commit | 0b027f7678379b6548b394a87506f09579c68268 (patch) | |
tree | 608b0365897feffccb16957b0b0e54687ad984cf | |
parent | 08559abc106283cd8c57a8dfc9dd3b6aa79fdcac (diff) |
Fix removal of punch range
set_auto_punch_location() is a NO-OP when there's no punch range.
This disconnects `punch_connections`, clears session-events,
and emits auto_punch_location_changed().
-rw-r--r-- | libs/ardour/location.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index bc97519ffe..de70abb6c5 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1041,6 +1041,11 @@ Locations::remove (Location *loc) for (i = locations.begin(); i != locations.end(); ++i) { if ((*i) == loc) { bool was_loop = (*i)->is_auto_loop(); + if ((*i)->is_auto_punch()) { + /* needs to happen before deleting: + * disconnect signals, clear events */ + _session.set_auto_punch_location (0); + } delete *i; locations.erase (i); was_removed = true; |