Compare commits
3 Commits
fa858a0386
...
04131077b3
Author | SHA1 | Date | |
---|---|---|---|
04131077b3 | |||
15b92334dc | |||
a6b63b1cca |
@ -253,13 +253,19 @@ AutomationRegionView::paste (timepos_t const & pos
|
||||
/* add multi-paste offset if applicable */
|
||||
p += view->editor ().get_paste_offset (pos, paste_count > 0 ? 1 : 0, len);
|
||||
|
||||
/* convert sample-position to model's unit and position */
|
||||
timepos_t model_pos = timepos_t (source_relative_distance (timecnt_t (p, timepos_t()), slist->time_domain()));
|
||||
timepos_t model_pos = pos;
|
||||
|
||||
/* potentially snap */
|
||||
|
||||
view->editor().snap_to (model_pos, Temporal::RoundNearest);
|
||||
|
||||
/* convert timeline position to model's (source-relative) position */
|
||||
|
||||
model_pos = timepos_t (_region->source_position().distance (model_pos));
|
||||
|
||||
XMLNode& before = my_list->get_state();
|
||||
my_list->paste (*slist, model_pos);
|
||||
view->session()->add_command(
|
||||
new MementoCommand<ARDOUR::AutomationList>(_line->memento_command_binder(), &before, &my_list->get_state()));
|
||||
view->session()->add_command(new MementoCommand<ARDOUR::AutomationList>(_line->memento_command_binder(), &before, &my_list->get_state()));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -4584,18 +4584,6 @@ Editor::cut_copy_points (Editing::CutCopyOp op, timepos_t const & earliest_time)
|
||||
earliest = std::min (earliest, (*ctrl_evt)->when);
|
||||
}
|
||||
|
||||
/* Snap start time backwards, so copy/paste is snap aligned. */
|
||||
|
||||
if (earliest != timepos_t::max (earliest.time_domain())) {
|
||||
if (earliest.time_domain() == Temporal::BeatTime) {
|
||||
/* always just round down to beat */
|
||||
earliest = timepos_t (earliest.beats().round_down_to_beat());
|
||||
} else {
|
||||
/* do actual snap */
|
||||
snap_to (earliest, Temporal::RoundDownMaybe);
|
||||
}
|
||||
}
|
||||
|
||||
for (Lists::iterator i = lists.begin(); i != lists.end(); ++i) {
|
||||
/* Correct this copy list so that it is relative to the earliest
|
||||
start time, so relative ordering between points is preserved
|
||||
|
@ -1187,12 +1187,6 @@ RegionView::region_relative_distance (timecnt_t const & duration, Temporal::Time
|
||||
return Temporal::TempoMap::use()->convert_duration (duration, _region->position(), domain);
|
||||
}
|
||||
|
||||
timecnt_t
|
||||
RegionView::source_relative_distance (timecnt_t const & duration, Temporal::TimeDomain domain)
|
||||
{
|
||||
return Temporal::TempoMap::use()->convert_duration (duration, _region->source_position(), domain);
|
||||
}
|
||||
|
||||
void
|
||||
RegionView::update_visibility ()
|
||||
{
|
||||
|
@ -196,7 +196,6 @@ protected:
|
||||
void maybe_raise_cue_markers ();
|
||||
|
||||
Temporal::timecnt_t region_relative_distance (Temporal::timecnt_t const &, Temporal::TimeDomain desired_time_domain);
|
||||
Temporal::timecnt_t source_relative_distance (Temporal::timecnt_t const &, Temporal::TimeDomain desired_time_domain);
|
||||
|
||||
boost::shared_ptr<ARDOUR::Region> _region;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user