summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-04-12 11:09:49 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-04-12 11:09:49 -0400
commitecfd2a74552a45781e4d57a09e73313cd8815a4d (patch)
treefbd236dd6b63074b8bebe4aa6eb0b129236bff7a /gtk2_ardour/automation_line.cc
parentfcb423f3f69225e0be896cb10b34b9628ab666f2 (diff)
remove all unit-based methods from (Public)Editor; rationalize Editor::event_frame() to clearly identify whether the passed-in GdkEvent has window units or canvas units (the latter will be true for all events that are handled by the canvas and then passed to Editor
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 460802309a..72098fd7c8 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -243,7 +243,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_unrounded (_time_converter->to((*cp.model())->when) - _offset);
+ double const x = trackview.editor().frame_to_pixel_unrounded (_time_converter->to((*cp.model())->when) - _offset);
trackview.editor().session()->begin_reversible_command (_("automation event move"));
trackview.editor().session()->add_command (
@@ -739,10 +739,10 @@ AutomationLine::sync_model_with_view_point (ControlPoint& cp)
/* if xval has not changed, set it directly from the model to avoid rounding errors */
- if (view_x == trackview.editor().frame_to_unit_unrounded (_time_converter->to ((*cp.model())->when)) - _offset) {
+ if (view_x == trackview.editor().frame_to_pixel_unrounded (_time_converter->to ((*cp.model())->when)) - _offset) {
view_x = (*cp.model())->when - _offset;
} else {
- view_x = trackview.editor().unit_to_frame (view_x);
+ view_x = trackview.editor().pixel_to_frame (view_x);
view_x = _time_converter->from (view_x + _offset);
}
@@ -760,7 +760,7 @@ AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_
ControlPoint *acp = 0;
double unit_xval;
- unit_xval = trackview.editor().frame_to_unit_unrounded (xval);
+ unit_xval = trackview.editor().frame_to_pixel_unrounded (xval);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -947,7 +947,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
* zoom and scroll into account).
*/
- tx = trackview.editor().frame_to_unit_unrounded (tx);
+ tx = trackview.editor().frame_to_pixel_unrounded (tx);
/* convert from canonical view height (0..1.0) to actual
* height coordinates (using X11's top-left rooted system)