summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-02-03 08:32:18 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-02-03 08:32:18 +0000
commitaffdf459a546237cca750a2a8d7a409556017d5c (patch)
treee77f75bfccf1f01dd8cdf16b0bf05127f7788cf0 /libs
parent58c2facb6a34c8a39e7f33bc87f8384c6b435975 (diff)
Fix reversed bounds check in Region::adjust_to_sync (), regions with a sync point snap to the sync point again.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2997 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/region.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 6bbc4329eb..0819704bcf 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -764,14 +764,14 @@ Region::adjust_to_sync (nframes_t pos)
// cerr << "adjusting pos = " << pos << " to sync at " << _sync_position << " offset = " << offset << " with dir = " << sync_dir << endl;
if (sync_dir > 0) {
- if (max_frames - pos > offset) {
+ if (pos > offset) {
pos -= offset;
+ } else {
+ pos = 0;
}
} else {
- if (pos > offset) {
+ if (max_frames - pos > offset) {
pos += offset;
- } else {
- pos = 0;
}
}