diff --git a/libs/ardour/ardour/location.h b/libs/ardour/ardour/location.h index 2f9bf841e9..7a36bfde5f 100644 --- a/libs/ardour/ardour/location.h +++ b/libs/ardour/ardour/location.h @@ -297,7 +297,7 @@ public: int set_current (Location *, bool want_lock = true); Location *current () const { return current_location; } - Location* mark_at (timepos_t const &, timecnt_t const & slop = timecnt_t::zero (Temporal::AudioTime)) const; + Location* mark_at (timepos_t const &, timecnt_t const & slop = timecnt_t::zero (Temporal::AudioTime), Location::Flags flags = Location::Flags (0)) const; void set_clock_origin (Location*, void *src); diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index c7ce3cec6b..d396364ee1 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -1467,7 +1467,7 @@ Locations::first_mark_before_flagged (timepos_t const & pos, bool include_specia } Location* -Locations::mark_at (timepos_t const & pos, timecnt_t const & slop) const +Locations::mark_at (timepos_t const & pos, timecnt_t const & slop, Location::Flags flags) const { Location* closest = 0; timecnt_t mindelta = timecnt_t::max (pos.time_domain()); @@ -1480,7 +1480,7 @@ Locations::mark_at (timepos_t const & pos, timecnt_t const & slop) const Glib::Threads::RWLock::ReaderLock lm (_lock); for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { - if ((*i)->is_mark()) { + if ((*i)->is_mark() && (flags && ((*i)->flags() == flags))) { if (pos > (*i)->start()) { delta = (*i)->start().distance (pos); } else {