if( this->is_event_win() && get_buttonpress() == 3 ) {
if( label ) {
int cur_x, cur_y;
- get_abs_cursor_xy(cur_x, cur_y, 0);
+ get_abs_cursor(cur_x, cur_y, 0);
timebar->label_edit->start(label, cur_x, cur_y);
}
result = 1;
double position = edl->local_session->get_selectionstart(1);
int64_t pixel = position_to_pixel(position);
// Draw insertion point position.
- set_color(mwindow->theme->timebar_cursor_color);
+ int color = mwindow->theme->timebar_cursor_color;
+ if( mwindow->preferences->forward_render_displacement )
+ color ^= 0x00ffff;
+ set_color(color);
draw_line(pixel, 0, pixel, get_h());
}
double TimeBar::get_edl_length()
{
- edl_length = 0;
-
- if( get_edl() ) {
-//printf("TimeBar::get_edl_length 1 %f\n", get_edl()->tracks->total_playable_length());
- edl_length = get_edl()->tracks->total_playable_length();
- }
-
-//printf("TimeBar::get_edl_length 2\n");
- if( !EQUIV(edl_length, 0) ) {
-//printf("TimeBar::get_edl_length 3\n");
- time_per_pixel = edl_length / get_w();
-//printf("TimeBar::get_edl_length 4\n");
- }
- else {
- time_per_pixel = 0;
- }
-//printf("TimeBar::get_edl_length 5\n");
-
+ edl_length = get_edl() ? get_edl()->tracks->total_length() : 0;
+ int w1 = get_w()-1;
+ time_per_pixel = !EQUIV(edl_length, 0) ? edl_length/w1 : w1;
return edl_length;
}