diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index 64dc1fcc67..79f70a2a13 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -252,7 +252,7 @@ public: bool clear_xrun_markers (); bool clear_ranges (); - void clear_cue_markers (samplepos_t start, samplepos_t end); + bool clear_cue_markers (samplepos_t start, samplepos_t end); void ripple (timepos_t const & at, timecnt_t const & distance, bool include_locked, bool notify); diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 4576444c7c..88acf9824f 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1663,7 +1663,7 @@ Locations::ripple (timepos_t const & at, timecnt_t const & distance, bool includ } } -void +bool Locations::clear_cue_markers (samplepos_t start, samplepos_t end) { TempoMap::SharedPtr tmap (TempoMap::use()); @@ -1671,7 +1671,7 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) Temporal::Beats eb; bool have_beats = false; vector r; - + bool removed_at_least_one = false; { Glib::Threads::RWLock::WriterLock lm (_lock); @@ -1702,6 +1702,7 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) continue; } } + removed_at_least_one = true; } ++i; @@ -1712,4 +1713,6 @@ Locations::clear_cue_markers (samplepos_t start, samplepos_t end) removed (l); /* EMIT SIGNAL */ delete l; } + + return removed_at_least_one; }