ruler_editor = this;
ruler_grabbed_widget = 0;
+ _ruler_separator = new Gtk::HSeparator();
+ _ruler_separator->set_size_request(-1, 2);
+ _ruler_separator->show();
+
_smpte_ruler = gtk_custom_hruler_new ();
smpte_ruler = Glib::wrap (_smpte_ruler);
smpte_ruler->set_name ("SMPTERuler");
switch (ev->button) {
case 1:
+ // Since we are about to move the playhead, cancel any running
+ // auditions.
+ if (session->is_auditioning()) {
+ session->cancel_audition ();
+ }
/* transport playhead */
snap_to (where);
session->request_locate (where);
+ _dragging_playhead = true;
break;
case 2:
return FALSE;
}
- hide_verbose_canvas_cursor();
stop_canvas_autoscroll();
nframes_t where = leftmost_frame + pixel_to_frame (x);
switch (ev->button) {
case 1:
/* transport playhead */
+ _dragging_playhead = false;
snap_to (where);
session->request_locate (where);
break;
return FALSE;
}
- double wcx=0,wcy=0;
+ double wcx=0,wcy=0;
double cx=0,cy=0;
gint x,y;
/* need to use the correct x,y, the event lies */
time_canvas_event_box.get_window()->get_pointer (x, y, state);
-
+
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
+ /// ripped from maybe_autoscroll, and adapted to work here
nframes_t one_page = (nframes_t) rint (canvas_width * frames_per_unit);
nframes_t rightmost_frame = leftmost_frame + one_page;
break;
}
- if (cursor)
- {
+ if (cursor) {
cursor->set_position (where);
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;
mitem->set_active(true);
}
- ruler_items.push_back (CheckMenuElem (X_("Timecode"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
+ ruler_items.push_back (CheckMenuElem (_("Timecode"), bind (mem_fun(*this, &Editor::ruler_toggled), (int)ruler_metric_smpte)));
mitem = (CheckMenuItem *) &ruler_items.back();
if (ruler_shown[ruler_metric_smpte]) {
mitem->set_active(true);
frames_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
minsec_ruler->signal_motion_notify_event().connect (mem_fun(*this, &Editor::ruler_mouse_motion));
+ ruler_children.insert (canvaspos, Element(*_ruler_separator, PACK_SHRINK, PACK_START));
if (ruler_shown[ruler_metric_minsec]) {
lab_children.push_back (Element(minsec_label, PACK_SHRINK, PACK_START));
visible_timebars++;
}
- double tbpos = 0.0;
+ double tbpos = 1.0;
double old_unit_pos ;
if (ruler_shown[ruler_time_meter]) {
update_fixed_rulers();
//update_tempo_based_rulers();
- tempo_map_changed(Change (0), false);
+ redisplay_tempo (false);
time_canvas_event_box.show_all();
- time_button_event_box.show_all();
+ time_button_frame.show_all();
}
void