mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-25 16:07:49 +01:00
[Summary] Fixed crash with an attempt to remove loop marker and place playhead on any place under it
[Reviewed by] Paul Davis [Reviewed by QA] MKosharniy
This commit is contained in:
parent
ca79e78fb8
commit
8e76cb5153
1 changed files with 21 additions and 1 deletions
|
|
@ -1388,6 +1388,17 @@ Session::set_auto_loop_location (Location* location)
|
|||
|
||||
location->set_auto_loop (true, this);
|
||||
|
||||
if (play_loop && Config->get_seamless_loop()) {
|
||||
// set all tracks to use internal looping
|
||||
boost::shared_ptr<RouteList> rl = routes.reader ();
|
||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||
if (tr && !tr->hidden()) {
|
||||
tr->set_loop (location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* take care of our stuff first */
|
||||
|
||||
auto_loop_changed (location);
|
||||
|
|
@ -1549,7 +1560,16 @@ void
|
|||
Session::location_removed (Location *location)
|
||||
{
|
||||
if (location->is_auto_loop()) {
|
||||
set_auto_loop_location (0);
|
||||
set_auto_loop_location (0);
|
||||
|
||||
// set all tracks to NOT use internal looping
|
||||
boost::shared_ptr<RouteList> rl = routes.reader ();
|
||||
for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
|
||||
boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
|
||||
if (tr && !tr->hidden()) {
|
||||
tr->set_loop (0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (location->is_auto_punch()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue