summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-24 15:42:14 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-24 15:42:14 -0400
commit6f664c1f67f9a62d44b3ee8c3cae8c341e0731d3 (patch)
tree88133cd525135ef198b7bf9c4a7f1081826a5ac5 /libs/ardour/region.cc
parentb36e085001cabc13f20f6b6779d08d9816d76b00 (diff)
many pervasive changes primarily related to waveform drawing, particular content-dragging, colors, and more
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index 706dda4a0a..847a72b23f 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -698,33 +698,32 @@ Region::set_start (framepos_t pos)
}
void
-Region::trim_start (framepos_t new_position)
+Region::move_start (frameoffset_t distance)
{
if (locked() || position_locked() || video_locked()) {
return;
}
framepos_t new_start;
- frameoffset_t const start_shift = new_position - _position;
- if (start_shift > 0) {
+ if (distance > 0) {
- if (_start > max_framepos - start_shift) {
- new_start = max_framepos;
+ if (_start > max_framepos - distance) {
+ new_start = max_framepos; // makes no sense
} else {
- new_start = _start + start_shift;
+ new_start = _start + distance;
}
if (!verify_start (new_start)) {
return;
}
- } else if (start_shift < 0) {
+ } else if (distance < 0) {
- if (_start < -start_shift) {
+ if (_start < -distance) {
new_start = 0;
} else {
- new_start = _start + start_shift;
+ new_start = _start + distance;
}
} else {
@@ -736,6 +735,7 @@ Region::trim_start (framepos_t new_position)
}
set_start_internal (new_start);
+
_whole_file = false;
first_edit ();