13
0

Merge branch 'ardour'

This commit is contained in:
Robin Gareus 2024-06-09 01:29:18 +02:00
commit 43089c742c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 4 additions and 4 deletions

View File

@ -2354,7 +2354,7 @@ Editor::add_location_mark_with_flag (timepos_t const & where, Location::Flags fl
return; return;
} }
if (_session->locations()->mark_at (where, timecnt_t (1))) { if (_session->locations()->mark_at (where, timecnt_t (1), flags)) {
return; return;
} }

View File

@ -297,7 +297,7 @@ public:
int set_current (Location *, bool want_lock = true); int set_current (Location *, bool want_lock = true);
Location *current () const { return current_location; } 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); void set_clock_origin (Location*, void *src);

View File

@ -1467,7 +1467,7 @@ Locations::first_mark_before_flagged (timepos_t const & pos, bool include_specia
} }
Location* 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; Location* closest = 0;
timecnt_t mindelta = timecnt_t::max (pos.time_domain()); 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); Glib::Threads::RWLock::ReaderLock lm (_lock);
for (LocationList::const_iterator i = locations.begin(); i != locations.end(); ++i) { 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()) { if (pos > (*i)->start()) {
delta = (*i)->start().distance (pos); delta = (*i)->start().distance (pos);
} else { } else {