/* if we seek beyond the current end of the canvas, move the end */
if (current_time_origin != pending_visual_change.time_origin) {
- //if (horizontal_adjustment.get_upper() < pending_visual_change.time_origin) {
last_canvas_frame = (cef > (pending_visual_change.time_origin + current_page_frames())) ? cef : pending_visual_change.time_origin + current_page_frames();
horizontal_adjustment.set_upper ((cef - csf) / frames_per_unit);
- //}
horizontal_adjustment.set_value (pending_visual_change.time_origin / frames_per_unit);
} else {
update_fixed_rulers();
_master_group = new ArdourCanvas::Group (*track_canvas->root());
+ transport_loop_range_rect = new ArdourCanvas::SimpleRect (*_master_group, 0.0, 0.0, 0.0, 0.0);
+ transport_loop_range_rect->property_outline_pixels() = 1;
+ transport_loop_range_rect->hide();
+
+ transport_punch_range_rect = new ArdourCanvas::SimpleRect (*_master_group, 0.0, 0.0, 0.0, 0.0);
+ transport_punch_range_rect->property_outline_pixels() = 0;
+ transport_punch_range_rect->hide();
+
/* a group to hold time (measure) lines */
time_line_group = new ArdourCanvas::Group (*_master_group, 0.0, 0.0);
+ range_marker_drag_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
+ range_marker_drag_rect->hide ();
+
_trackview_group = new ArdourCanvas::Group (*_master_group);
_region_motion_group = new ArdourCanvas::Group (*_trackview_group);
cd_marker_bar->property_outline_what() = (0x1 | 0x8);
cd_marker_bar->property_outline_pixels() = 0;
- range_marker_drag_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
- range_marker_drag_rect->hide ();
-
timebar_group = new ArdourCanvas::Group (*track_canvas->root(), 0.0, 0.0);
cursor_group = new ArdourCanvas::Group (*track_canvas->root(), 0.0, 0.0);
transport_bar_drag_rect->property_outline_pixels() = 0;
transport_bar_drag_rect->hide ();
- transport_loop_range_rect = new ArdourCanvas::SimpleRect (*_master_group, 0.0, 0.0, 0.0, 0.0);
- transport_loop_range_rect->property_outline_pixels() = 1;
- transport_loop_range_rect->hide();
-
- transport_punch_range_rect = new ArdourCanvas::SimpleRect (*_master_group, 0.0, 0.0, 0.0, 0.0);
- transport_punch_range_rect->property_outline_pixels() = 0;
- transport_punch_range_rect->hide();
-
- transport_loop_range_rect->lower_to_bottom (); // loop on the bottom
-
transport_punchin_line = new ArdourCanvas::SimpleLine (*_master_group);
transport_punchin_line->property_x1() = 0.0;
transport_punchin_line->property_y1() = 0.0;
Location* tpl;
if ((Config->get_punch_in() || Config->get_punch_out()) && ((tpl = transport_punch_location()) != 0)) {
-
- double x1 = frame_to_pixel (tpl->start());
- double x2 = frame_to_pixel (tpl->end());
-
guint track_canvas_width,track_canvas_height;
track_canvas->get_size(track_canvas_width,track_canvas_height);
-
- transport_punch_range_rect->property_x1() = x1;
- transport_punch_range_rect->property_x2() = x2;
-
- transport_punch_range_rect->property_x1() = (Config->get_punch_in() ? x1 : 0);
- transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? x2 : track_canvas_width);
+ if (Config->get_punch_in()) {
+ transport_punch_range_rect->property_x1() = frame_to_pixel (tpl->start());
+ transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? frame_to_pixel (tpl->end()) : frame_to_pixel (JACK_MAX_FRAMES));
+ } else {
+ transport_punch_range_rect->property_x1() = 0;
+ transport_punch_range_rect->property_x2() = (Config->get_punch_out() ? frame_to_pixel (tpl->end()) : track_canvas_width);
+ }
if (visibility) {
transport_punch_range_rect->show();
}
- }
- else if (visibility) {
+ } else if (visibility) {
transport_punch_range_rect->hide();
}
-
-// if (session->get_punch_in()) {
-// double x = frame_to_pixel (transport_punch_location->start());
-// gnome_canvas_item_set (transport_punchin_line, "x1", x, "x2", x, NULL);
-
-// if (visibility) {
-// gnome_canvas_item_show (transport_punchin_line);
-// }
-// }
-// else if (visibility) {
-// gnome_canvas_item_hide (transport_punchin_line);
-// }
-
-// if (session->get_punch_out()) {
-// double x = frame_to_pixel (transport_punch_location->end());
-
-// gnome_canvas_item_set (transport_punchout_line, "x1", x, "x2", x, NULL);
-
-// if (visibility) {
-// gnome_canvas_item_show (transport_punchout_line);
-// }
-// }
-// else if (visibility) {
-// gnome_canvas_item_hide (transport_punchout_line);
-// }
}
void
drag_info.last_pointer_frame = 0;
drag_info.current_pointer_frame = 0;
drag_info.brushing = false;
+ range_marker_drag_rect->hide();
drag_info.clear_copied_locations ();
}
}
gdouble old_canvas_timebars_vsize = canvas_timebars_vsize;
- canvas_timebars_vsize = timebar_height * visible_timebars;
+ canvas_timebars_vsize = (timebar_height * visible_timebars) - 1;
gdouble vertical_pos_delta = canvas_timebars_vsize - old_canvas_timebars_vsize;
if (vertical_pos_delta < 0 && (vertical_adjustment.get_value() + canvas_height) >= vertical_adjustment.get_upper()) {