From 73f2baf5c6ac62982b7a542f9a6937435b3d4ad7 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 17 Sep 2014 09:38:42 -0400 Subject: [PATCH] Locations::clear_ranges() leaves punch/loop/session ranges intact if they exist --- libs/ardour/location.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index aab2b4ea85..84fe93e7f8 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -766,6 +766,17 @@ Locations::clear_ranges () tmp = i; ++tmp; + /* We do not remove these ranges as part of this + * operation + */ + + if ((*i)->is_auto_punch() || + (*i)->is_auto_loop() || + (*i)->is_session_range()) { + i = tmp; + continue; + } + if (!(*i)->is_mark()) { delete *i; locations.erase (i);