prevent multiple cue markers at the same location
This commit is contained in:
parent
76f4813ee6
commit
e14acfc07d
@ -980,6 +980,18 @@ Locations::add (Location *loc, bool make_current)
|
||||
|
||||
{
|
||||
Glib::Threads::RWLock::WriterLock lm (_lock);
|
||||
|
||||
/* Do not allow multiple cue markers in the same location */
|
||||
|
||||
if (loc->is_cue_marker()) {
|
||||
for (LocationList::iterator i = locations.begin(); i != locations.end(); ++i) {
|
||||
if ((*i)->is_cue_marker() && (*i)->start() == loc->start()) {
|
||||
locations.erase (i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locations.push_back (loc);
|
||||
|
||||
if (make_current) {
|
||||
|
Loading…
Reference in New Issue
Block a user