if( !result && buttonpress && i == AUTOMATION_SPEED )
mwindow->speed_after(-1);
- int current_grouptype = mwindow->edl->local_session->zoombar_showautotype;
- if( result && buttonpress && grouptype != current_grouptype ) {
- mwindow->edl->local_session->zoombar_showautotype = grouptype;
- mwindow->gui->zoombar->update_autozoom();
+ if( result && buttonpress ) {
+ int color = GWindowGUI::auto_colors[i];
+ mwindow->gui->zoombar->update_autozoom(grouptype, color);
}
break; }
new_cursor = UPRIGHT_ARROW_CURSOR;
}
-
return result;
}
!session->drag_edit ? 0 : session->drag_edit->group_id);
double position = -1;
+ int show_edge = !session->drag_handle ? 1 : 2;
switch( handle_mode ) {
case MOVE_RIPPLE:
+ case MOVE_EDGE:
+ position = session->drag_handle ?
+ session->drag_position : session->drag_start;
+ show_edge = 3 - show_edge;
+ break;
case MOVE_ROLL:
case MOVE_SLIDE:
position = session->drag_position;
break;
case MOVE_SLIP:
- case MOVE_EDGE:
position = session->drag_start;
+ show_edge = 3 - show_edge;
break;
}
if( position < 0 ) position = 0;
Track *track = session->drag_handle_track();
int64_t pos = track->to_units(position, 0);
- render_handle_frame(edl, pos, shift_down() ? 0 :
- session->drag_handle ? 1 : 2);
+ render_handle_frame(edl, pos, shift_down() ? 0 : show_edge);
edl->remove_user();
}
}
CICache *video_cache = new CICache(preferences);
render_engine->set_vcache(video_cache);
render_engine->arm_command(&command);
- int64_t left = pos-1;
- if( left < 0 ) left = 0;
VRender *vrender = render_engine->vrender;
result = vrender &&
!vrender->process_buffer(&vlt, left, 0) &&
Track *track = mwindow->session->drag_handle_track();
double position = track->from_units(mode == 1 ? left : pos);
if( position < 0 ) position = 0;
- edl->local_session->set_selectionstart(position);
- edl->local_session->set_selectionend(position);
PlaybackEngine *playback_engine = mwindow->cwindow->playback_engine;
if( playback_engine->is_playing_back )
playback_engine->stop_playback(1);
- mwindow->cwindow->playback_engine->refresh_frame(CHANGE_NONE, edl, 0);
+ edl->local_session->set_selectionstart(position);
+ edl->local_session->set_selectionend(position);
+ mwindow->cwindow->playback_engine->refresh_frame(CHANGE_EDL, edl, 0);
break; }
}
return result;
float change = value - old_value;
current->adjust_to_new_coordinates(position, value);
update_ganged_autos(change, current->autos->track, current);
- show_message(current, 1,", %.2f", current->get_value());
+ int color = GWindowGUI::auto_colors[current->autos->autoidx];
+ show_message(current, color, ", %.2f", current->get_value());
}
break;
value * levered_position(position - current->position,
current->get_control_in_position()));
update_ganged_autos(0, current->autos->track, current);
- show_message(current, 1,", %.2f", current->get_control_in_value());
+ int color = GWindowGUI::auto_colors[current->autos->autoidx];
+ show_message(current, color, ", %.2f", current->get_control_in_value());
}
break; }
value * levered_position(position - current->position,
current->get_control_out_position()));
update_ganged_autos(0, current->autos->track, current);
- show_message(current, 1,", %.2f", current->get_control_out_value());
+ int color = GWindowGUI::auto_colors[current->autos->autoidx];
+ show_message(current, color, ", %.2f", current->get_control_out_value());
}
break; }
}
result = 1;
current->value = value;
current->position = position;
- show_message(current, 0,", %d", current->value);
+ show_message(current, -1, ", %d", current->value);
}
return result;
{
result = 1;
current->position = position;
- show_message(current, 0,"");
+ show_message(current, -1, "");
double position_f = current->autos->track->from_units(current->position);
double center_f = (mwindow->edl->local_session->get_selectionstart(1) +
mwindow->session->track_highlighted = track;
result = 1;
current->position = position;
- show_message(current, 0,"");
+ show_message(current, -1, "");
double position_f = current->autos->track->from_units(current->position);
double center_f = (mwindow->edl->local_session->get_selectionstart(1) +
}
}
+ if( mwindow->edl->local_session->zoombar_showautocolor >= 0 )
+ mwindow->gui->zoombar->update_autozoom(-1);
+
if (result)
cursor_update(0);
gui->stop_transport("TrackCanvas::button_press_event");
}
- int update_overlay = 0, update_cursor = 0, rerender = 0;
+ int update_overlay = 0, update_cursor = 0, rerender = 0, update_message = 0;
if(get_buttonpress() == WHEEL_UP) {
if(shift_down())
if( do_keyframes(cursor_x, cursor_y,
0, get_buttonpress(), new_cursor,
update_cursor, rerender) ) break;
+ update_message = 1;
// Test edit boundaries
if( do_edit_handles(cursor_x, cursor_y,
1, rerender, update_overlay, new_cursor,
update_overlay = 1;
break;
}
+ update_message = 1;
// Test edit boundaries
if( do_edit_handles(cursor_x, cursor_y,
1, rerender, update_overlay, new_cursor, update_cursor) ) break;
gui->update_patchbay();
}
- if( update_overlay ) {
+ if( update_message )
+ gui->default_message();
+
+ if( update_overlay )
gui->draw_overlays(1);
- }
+
if( update_cursor < 0 ) {
// double_click edit
gui->swindow->update_selection();
}
-void TrackCanvas::show_message(Auto *current, int show_curve_type, const char *fmt, ...)
+void TrackCanvas::show_message(Auto *current, int box_color, const char *fmt, ...)
{
char string[BCTEXTLEN];
char *cp = string, *ep = cp + sizeof(string)-1;
- if( show_curve_type ) {
+ if( box_color >= 0 ) {
cp += snprintf(string, ep-cp, "%-8s ",
FloatAuto::curve_name(((FloatAuto*)current)->curve_mode));
}
va_start(ap, fmt);
vsnprintf(cp, ep-cp, fmt, ap);
va_end(ap);
- gui->show_message(string);
+ gui->show_message(string, -1, box_color);
}
// Patchbay* TrackCanvas::get_patchbay()