rename MidiView::relative_position() to ::view_position_to_model_position()
This commit is contained in:
@@ -6796,8 +6796,8 @@ NoteCreateDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||
* coordinates relative to the region in order to draw it correctly.
|
||||
*/
|
||||
|
||||
const timecnt_t rrp1 (_midi_view->relative_position (_note[0]));
|
||||
const timecnt_t rrp2 (_midi_view->relative_position (_note[1]));
|
||||
const timecnt_t rrp1 (_midi_view->view_position_to_model_position (_note[0]));
|
||||
const timecnt_t rrp2 (_midi_view->view_position_to_model_position (_note[1]));
|
||||
|
||||
double const x0 = editing_context.sample_to_pixel (rrp1.samples ());
|
||||
double const x1 = editing_context.sample_to_pixel (rrp2.samples ());
|
||||
@@ -6820,8 +6820,8 @@ NoteCreateDrag::motion (GdkEvent* event, bool)
|
||||
|
||||
_note[1] = std::max (aligned_beats, (_note[0].beats () + min_length));
|
||||
|
||||
const timecnt_t rrp1 (_midi_view->relative_position (_note[0]));
|
||||
const timecnt_t rrp2 (_midi_view->relative_position (_note[1]));
|
||||
const timecnt_t rrp1 (_midi_view->view_position_to_model_position (_note[0]));
|
||||
const timecnt_t rrp2 (_midi_view->view_position_to_model_position (_note[1]));
|
||||
|
||||
double const x0 = editing_context.sample_to_pixel (rrp1.samples ());
|
||||
double const x1 = editing_context.sample_to_pixel (rrp2.samples ());
|
||||
|
||||
@@ -3036,7 +3036,7 @@ MidiView::snap_pixel_to_time (double x, bool ensure_snap)
|
||||
* correspond to the source start, or a region start.
|
||||
*/
|
||||
timecnt_t
|
||||
MidiView::relative_position (timepos_t const & p) const
|
||||
MidiView::view_position_to_model_position (timepos_t const & p) const
|
||||
{
|
||||
if (!_midi_region || _show_source) {
|
||||
return timecnt_t (p, timepos_t (Temporal::Beats()));
|
||||
|
||||
@@ -289,7 +289,7 @@ class MidiView : public virtual sigc::trackable, public LineMerger
|
||||
* is true.
|
||||
*/
|
||||
|
||||
Temporal::timecnt_t relative_position (Temporal::timepos_t const & p) const;
|
||||
Temporal::timecnt_t view_position_to_model_position (Temporal::timepos_t const & p) const;
|
||||
|
||||
Temporal::timepos_t source_beats_to_timeline (Temporal::Beats const &) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user