13
0

in insert time, don't differentiate between audio/music time markers

This commit is contained in:
Paul Davis 2023-10-04 18:49:30 -06:00
parent dd556f6ee8
commit 91f50b8a06

View File

@ -8541,24 +8541,23 @@ Editor::insert_time (timepos_t const & pos, timecnt_t const & samples, InsertTim
Locations::LocationList::const_iterator tmp; Locations::LocationList::const_iterator tmp;
if ((*i)->position_time_domain() == Temporal::AudioTime) { bool const was_locked = (*i)->locked ();
bool const was_locked = (*i)->locked ();
if (locked_markers_too) {
(*i)->unlock ();
}
if ((*i)->start() >= pos) { if (locked_markers_too) {
// move end first, in case we're moving by more than the length of the range (*i)->unlock ();
if (!(*i)->is_mark()) { }
(*i)->set_end ((*i)->end() + samples, false);
}
(*i)->set_start ((*i)->start() + samples, false);
moved = true;
}
if (was_locked) { if ((*i)->start() >= pos) {
(*i)->lock (); // move end first, in case we're moving by more than the length of the range
if (!(*i)->is_mark()) {
(*i)->set_end ((*i)->end() + samples, false);
} }
(*i)->set_start ((*i)->start() + samples, false);
moved = true;
}
if (was_locked) {
(*i)->lock ();
} }
} }