summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_rulers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-04-13 02:54:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-04-13 02:54:34 +0000
commit04551d5996405ff6a12905fb895770139a1b6cad (patch)
tree53ca7feedcd5604d45611d5a54174bf7e1a1560c /gtk2_ardour/editor_rulers.cc
parent91f9b72e8faaa969b606f9964c6a78b346e9bf12 (diff)
fix nasty mess i created last week with dragging in the rulers; new german trnslation from sebastian
git-svn-id: svn://localhost/ardour2/trunk@1713 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_rulers.cc')
-rw-r--r--gtk2_ardour/editor_rulers.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/gtk2_ardour/editor_rulers.cc b/gtk2_ardour/editor_rulers.cc
index 3182341437..409b8b471a 100644
--- a/gtk2_ardour/editor_rulers.cc
+++ b/gtk2_ardour/editor_rulers.cc
@@ -192,7 +192,6 @@ Editor::ruler_button_release (GdkEventButton* ev)
return FALSE;
}
- hide_verbose_canvas_cursor();
stop_canvas_autoscroll();
nframes_t where = leftmost_frame + pixel_to_frame (x);
@@ -251,7 +250,7 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
return FALSE;
}
- double wcx=0,wcy=0;
+ double wcx=0,wcy=0;
double cx=0,cy=0;
gint x,y;
@@ -260,12 +259,11 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
/* need to use the correct x,y, the event lies */
time_canvas_event_box.get_window()->get_pointer (x, y, state);
- time_canvas.c2w (x, y, wcx, wcy);
- time_canvas.w2c (wcx, wcy, cx, cy);
- wcx = x;
- nframes_t where = event_frame ((GdkEvent*) ev, &wcx, (double *) 0);
- cx = wcx;
+ track_canvas.c2w (x, y, wcx, wcy);
+ track_canvas.w2c (wcx, wcy, cx, cy);
+
+ nframes_t where = leftmost_frame + pixel_to_frame (x);
/// ripped from maybe_autoscroll, and adapted to work here
nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
@@ -312,9 +310,9 @@ Editor::ruler_mouse_motion (GdkEventMotion* ev)
if (cursor == edit_cursor) {
edit_cursor_clock.set (where);
+ } else if (cursor == playhead_cursor) {
+ UpdateAllTransportClocks (cursor->current_frame);
}
-
- show_verbose_time_cursor (where, 10, cx, 0);
}
return TRUE;