break;
case TempoMarkerItem:
- tm_marker_context_menu (&event->button, item);
+ tempo_or_meter_marker_context_menu (&event->button, item);
break;
case MeterMarkerItem:
- tm_marker_context_menu (&event->button, item);
+ tempo_or_meter_marker_context_menu (&event->button, item);
break;
case CrossfadeViewItem:
void
-Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool swap_direction, bool obey_snap)
+Editor::single_contents_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool swap_direction)
{
boost::shared_ptr<Region> region (rv.region());
}
}
- if (obey_snap) {
- snap_to (new_bound);
- }
region->trim_start ((nframes64_t) (new_bound * speed), this);
rv.region_changed (PropertyChange (ARDOUR::Properties::start));
}
void
-Editor::single_start_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool obey_snap, bool no_overlap)
+Editor::single_start_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
{
boost::shared_ptr<Region> region (rv.region());
return;
}
- nframes64_t new_bound;
-
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
RouteTimeAxisView* tv = dynamic_cast<RouteTimeAxisView*>(tvp);
speed = tv->track()->speed();
}
- if (left_direction) {
- new_bound = (nframes64_t) (region->position()/speed) - frame_delta;
- } else {
- new_bound = (nframes64_t) (region->position()/speed) + frame_delta;
- }
-
- if (obey_snap) {
- snap_to (new_bound, (left_direction ? 0 : 1));
- }
-
nframes64_t pre_trim_first_frame = region->first_frame();
region->trim_front ((nframes64_t) (new_bound * speed), this);
}
void
-Editor::single_end_trim (RegionView& rv, nframes64_t frame_delta, bool left_direction, bool obey_snap, bool no_overlap)
+Editor::single_end_trim (RegionView& rv, nframes64_t new_bound, bool no_overlap)
{
boost::shared_ptr<Region> region (rv.region());
return;
}
- nframes64_t new_bound;
-
double speed = 1.0;
TimeAxisView* tvp = clicked_axisview;
RouteTimeAxisView* tv = dynamic_cast<RouteTimeAxisView*>(tvp);
speed = tv->track()->speed();
}
- if (left_direction) {
- new_bound = (nframes64_t) ((region->last_frame() + 1)/speed) - frame_delta;
- } else {
- new_bound = (nframes64_t) ((region->last_frame() + 1)/speed) + frame_delta;
- }
-
- if (obey_snap) {
- snap_to (new_bound);
- }
-
nframes64_t pre_trim_last_frame = region->last_frame();
region->trim_end ((nframes64_t) (new_bound * speed), this);
bool regions_touching = false;
- if (region_right != 0 && (pre_trim_last_frame == region_right->first_frame() - 1)){
- regions_touching = true;
+ if (region_right != 0 && (pre_trim_last_frame == region_right->first_frame() - 1)) {
+ regions_touching = true;
}
//Only trim region on the right if the last frame has gone beyond the right region's first frame.
Editor::escape ()
{
if (_drags->active ()) {
- _drags->break_drag ();
+ _drags->abort ();
} else {
selection->clear ();
}