summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mouse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/editor_mouse.cc')
-rw-r--r--gtk2_ardour/editor_mouse.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc
index ed7f46df08..6574af5ecf 100644
--- a/gtk2_ardour/editor_mouse.cc
+++ b/gtk2_ardour/editor_mouse.cc
@@ -2964,7 +2964,7 @@ Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event)
control_point->line().start_drag (control_point, drag_info.grab_frame, 0);
- double fraction = 1.0 - ((control_point->get_y() - control_point->line().y_position()) / (double)control_point->line().height());
+ float fraction = 1.0 - (control_point->get_y() / control_point->line().height());
set_verbose_canvas_cursor (control_point->line().get_verbose_cursor_string (fraction),
drag_info.current_pointer_x + 20, drag_info.current_pointer_y + 20);
@@ -3013,7 +3013,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
cx = max (0.0, cx);
cy = max (0.0, cy);
- cy = min ((double) (cp->line().y_position() + cp->line().height()), cy);
+ cy = min ((double) cp->line().height(), cy);
//translate cx to frames
nframes64_t cx_frames = unit_to_frame (cx);
@@ -3022,7 +3022,7 @@ Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent*
snap_to (cx_frames);
}
- const double fraction = 1.0 - ((cy - cp->line().y_position()) / (double)cp->line().height());
+ float fraction = 1.0 - (cy / cp->line().height());
bool push;
@@ -3113,7 +3113,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
start_grab (event, fader_cursor);
- const double fraction = 1.0 - ((cy - line->y_position()) / (double)line->height());
+ double fraction = 1.0 - (cy / line->height());
line->start_drag (0, drag_info.grab_frame, fraction);
@@ -3155,7 +3155,7 @@ Editor::line_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
cy = max (0.0, cy);
cy = min ((double) line->height(), cy);
- const double fraction = 1.0 - ((cy - line->y_position()) / (double)line->height());
+ double fraction = 1.0 - (cy / line->height());
bool push;
@@ -3881,7 +3881,7 @@ Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
tvp2 = trackview_by_y_position (iy1 + y_delta);
temp_rtv = dynamic_cast<RouteTimeAxisView*>(tvp2);
- rv->set_y_position_and_height (0, temp_rtv->current_height());
+ rv->set_height (temp_rtv->current_height());
/* if you un-comment the following, the region colours will follow the track colours whilst dragging,
personally, i think this can confuse things, but never mind.