summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-05-31 17:08:25 +0000
committerCarl Hetherington <carl@carlh.net>2012-05-31 17:08:25 +0000
commit524b61731a6be39f74cef126627d138309303e41 (patch)
tree087a3d431850c6822721f2e04884412ba418ef5b /gtk2_ardour/automation_line.cc
parent6a388349c6d93e3d4eca9fcc8cd65b725a3dfa5d (diff)
Remove some more unwanted roundings from control point frame to pixel conversions.
git-svn-id: svn://localhost/ardour2/branches/3.0@12507 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 9840a5adae..d7b3f3e68d 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -246,7 +246,7 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y)
y = min (1.0, y);
y = _height - (y * _height);
- double const x = trackview.editor().frame_to_unit (_time_converter->to((*cp.model())->when) - _offset);
+ double const x = trackview.editor().frame_to_unit_unrounded (_time_converter->to((*cp.model())->when) - _offset);
trackview.editor().session()->begin_reversible_command (_("automation event move"));
trackview.editor().session()->add_command (
@@ -607,7 +607,7 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp, framecnt_t distanc
/* if xval has not changed, set it directly from the model to avoid rounding errors */
- if (view_x == trackview.editor().frame_to_unit (_time_converter->to ((*cp.model())->when)) - _offset) {
+ if (view_x == trackview.editor().frame_to_unit_unrounded (_time_converter->to ((*cp.model())->when)) - _offset) {
view_x = (*cp.model())->when - _offset;
} else {
view_x = trackview.editor().unit_to_frame (view_x);
@@ -633,7 +633,7 @@ AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_
ControlPoint *acp = 0;
double unit_xval;
- unit_xval = trackview.editor().frame_to_unit (xval);
+ unit_xval = trackview.editor().frame_to_unit_unrounded (xval);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -817,7 +817,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
* zoom and scroll into account).
*/
- tx = trackview.editor().frame_to_unit (tx);
+ tx = trackview.editor().frame_to_unit_unrounded (tx);
/* convert from canonical view height (0..1.0) to actual
* height coordinates (using X11's top-left rooted system)