diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 0d1eda11b7..e6313d3ebb 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -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) {