Tidy up the popup region editor and fix a few bugs with it; should close mantis 2601 and 2602.

git-svn-id: svn://localhost/ardour2/branches/3.0@5813 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-10-20 01:05:33 +00:00
parent 089d75e8a8
commit 9155aca8c2
5 changed files with 96 additions and 55 deletions

View file

@ -803,6 +803,10 @@ Region::trim_front (nframes_t new_position, void *src)
}
}
/** @param new_endpoint New region end point, such that, for example,
* a region at 0 of length 10 has an endpoint of 9.
*/
void
Region::trim_end (nframes_t new_endpoint, void */*src*/)
{
@ -811,7 +815,7 @@ Region::trim_end (nframes_t new_endpoint, void */*src*/)
}
if (new_endpoint > _position) {
trim_to_internal (_position, new_endpoint - _position, this);
trim_to_internal (_position, new_endpoint - _position + 1, this);
if (!_frozen) {
recompute_at_end ();
}
@ -977,9 +981,7 @@ Region::set_position_locked (bool yn)
void
Region::set_sync_position (nframes_t absolute_pos)
{
nframes_t file_pos;
file_pos = _start + (absolute_pos - _position);
nframes_t const file_pos = _start + (absolute_pos - _position);
if (file_pos != _sync_position) {