libardour: Region::get_cue_markers() should only return markers within the region boundaries, whether abs(olute) position is requested or not

This commit is contained in:
Paul Davis
2021-08-02 12:58:40 -06:00
parent 68850892b8
commit 657743a8e4

View File

@@ -1921,10 +1921,12 @@ Region::get_cue_markers (CueMarkers& cues, bool abs) const
for (SourceList::const_iterator s = _sources.begin (); s != _sources.end(); ++s) {
CueMarkers const& x = (*s)->cue_markers ();
for (CueMarkers::const_iterator p = x.begin (); p != x.end (); ++p) {
if (abs) {
cues.insert (*p);
} else if (p->position() >= _start && p->position() < _start + _length) {
cues.insert (CueMarker (p->text(), p->position() - _start));
if (p->position() >= _start && p->position() < _start + _length) {
if (abs) {
cues.insert (*p);
} else {
cues.insert (CueMarker (p->text(), p->position() - _start));
}
}
}
}