summaryrefslogtreecommitdiff
path: root/gtk2_ardour/region_view.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 /gtk2_ardour/region_view.cc
parentb36e085001cabc13f20f6b6779d08d9816d76b00 (diff)
many pervasive changes primarily related to waveform drawing, particular content-dragging, colors, and more
Diffstat (limited to 'gtk2_ardour/region_view.cc')
-rw-r--r--gtk2_ardour/region_view.cc26
1 files changed, 4 insertions, 22 deletions
diff --git a/gtk2_ardour/region_view.cc b/gtk2_ardour/region_view.cc
index 37ddb45917..ac7fe7e8fa 100644
--- a/gtk2_ardour/region_view.cc
+++ b/gtk2_ardour/region_view.cc
@@ -632,9 +632,11 @@ RegionView::region_sync_changed ()
/* points set below */
sync_mark = new ArdourCanvas::Polygon (group);
+ CANVAS_DEBUG_NAME (sync_mark, string_compose ("sync mark for %1", get_item_name()));
sync_mark->set_fill_color (RGBA_TO_UINT(0,255,0,255)); // FIXME make a themeable colour
sync_line = new ArdourCanvas::Line (group);
+ CANVAS_DEBUG_NAME (sync_line, string_compose ("sync mark for %1", get_item_name()));
sync_line->set_outline_color (RGBA_TO_UINT(0,255,0,255)); // FIXME make a themeable colour
}
@@ -930,32 +932,12 @@ RegionView::thaw_after_trim ()
void
-RegionView::trim_contents (framepos_t frame_delta, bool left_direction, bool swap_direction)
+RegionView::move_contents (frameoffset_t distance)
{
if (_region->locked()) {
return;
}
-
- framepos_t new_bound;
-
- RouteTimeAxisView& rtv = dynamic_cast<RouteTimeAxisView&> (trackview);
- double const speed = rtv.track()->speed ();
-
- if (left_direction) {
- if (swap_direction) {
- new_bound = (framepos_t) (_region->position() / speed) + frame_delta;
- } else {
- new_bound = (framepos_t) (_region->position() / speed) - frame_delta;
- }
- } else {
- if (swap_direction) {
- new_bound = (framepos_t) (_region->position() / speed) - frame_delta;
- } else {
- new_bound = (framepos_t) (_region->position() / speed) + frame_delta;
- }
- }
-
- _region->trim_start ((framepos_t) (new_bound * speed));
+ _region->move_start (distance);
region_changed (PropertyChange (ARDOUR::Properties::start));
}