Don't round conversions from frame to unit when setting up control points, as it will cause big inaccuracies when zoomed out.

git-svn-id: svn://localhost/ardour2/branches/3.0@12503 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-05-31 17:07:02 +00:00
parent fc77252d51
commit 650f16620d
2 changed files with 5 additions and 1 deletions

View File

@ -239,6 +239,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
return rint ((double) frame / (double) frames_per_unit);
}
double frame_to_unit_unrounded (framepos_t frame) const {
return frame / frames_per_unit;
}
double frame_to_unit (double frame) const {
return rint (frame / frames_per_unit);
}

View File

@ -2875,7 +2875,7 @@ ControlPointDrag::motion (GdkEvent* event, bool)
bool const push = Keyboard::modifier_state_contains (event->button.state, Keyboard::PrimaryModifier);
_point->line().drag_motion (_editor->frame_to_unit (cx_frames), fraction, false, push);
_point->line().drag_motion (_editor->frame_to_unit_unrounded (cx_frames), fraction, false, push);
_editor->verbose_cursor()->set_text (_point->line().get_verbose_cursor_string (fraction));
}