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().
This commit is contained in:
parent
08559abc10
commit
0b027f7678
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user