diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-02 05:38:41 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-02 05:38:41 +0000 |
commit | 7eba21ca19897c7e7c89d676527d774dd2d95721 (patch) | |
tree | 21981e4b210958c1201179bd836d59661e9af950 /libs/ardour/location.cc | |
parent | 40a6f878a945d96e51839d036992521dd5883e05 (diff) |
remove broken loop button behaviour, and don't remove start+end markers when "clearing" the locations list
git-svn-id: svn://localhost/ardour2/trunk@1058 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r-- | libs/ardour/location.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index b46972ef2e..e09a59d42f 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -420,17 +420,19 @@ Locations::clear () { { Glib::Mutex::Lock lm (lock); - LocationList::iterator tmp; + for (LocationList::iterator i = locations.begin(); i != locations.end(); ) { - tmp = i; + + LocationList::iterator tmp = i; ++tmp; + if (!(*i)->is_end() && !(*i)->is_start()) { locations.erase (i); } + i = tmp; } - locations.clear (); current_location = 0; } @@ -579,7 +581,7 @@ Locations::set_state (const XMLNode& node) nlist = node.children(); - locations.clear (); // dangerous + locations.clear (); current_location = 0; { |