13
0

initial attempt to push certain kinds of Locations into LocateRoll events on the timeline for skip lists

This commit is contained in:
Paul Davis 2014-09-16 21:32:58 -04:00
parent b592ce3e44
commit 80c0400cda

View File

@ -1295,6 +1295,7 @@ Session::set_auto_loop_location (Location* location)
void void
Session::locations_added (Location *) Session::locations_added (Location *)
{ {
_locations->apply (*this, &Session::sync_locations_to_skips);
set_dirty (); set_dirty ();
} }
@ -1330,6 +1331,8 @@ Session::handle_locations_changed (Locations::LocationList& locations)
} }
} }
sync_locations_to_skips (locations);
if (!set_loop) { if (!set_loop) {
set_auto_loop_location (0); set_auto_loop_location (0);
} }
@ -1340,6 +1343,25 @@ Session::handle_locations_changed (Locations::LocationList& locations)
set_dirty(); set_dirty();
} }
void
Session::sync_locations_to_skips (Locations::LocationList& locations)
{
Locations::LocationList::iterator i;
Location* location;
clear_events (SessionEvent::LocateRoll);
for (i = locations.begin(); i != locations.end(); ++i) {
location = *i;
if (location->is_range_marker()) {
SessionEvent* ev = new SessionEvent (SessionEvent::LocateRoll, SessionEvent::Add, location->start(), location->end(), 1.0);
queue_event (ev);
}
}
}
void void
Session::enable_record () Session::enable_record ()
{ {