action->set_param("canvas",canvas_interface_->get_canvas());
action->set_param("canvas_interface",canvas_interface_);
action->set_param("keyframe",selected_kf);
- //synfig::info("DELTA: %s", (dragging_kf_time-selected_kf.get_time()).get_string().c_str());
try
{
canvas_interface_->get_instance()->perform_action(action);
//Do not respond mouse events if the list is empty
if(!kf_list_->size())
{
- synfig::info("Keyframe list empty");
+ // synfig::info("Keyframe list empty");
return true;
}
case GDK_MOTION_NOTIFY:
if(editable_)
{
- // stick to integer frames.
+ // stick to integer frames. It can be optional in the future
if(fps)
{
t = floor(t*fps + 0.5)/fps;
dragging_=false;
if(event->button.button==1)
{
- synfig::info("Looking keyframe at %s", t.get_string().c_str());
+ /*synfig::info("Looking keyframe at %s", t.get_string().c_str());
synfig::info("Total amount of keyframes %i", kf_list_->size());
synfig::info("Time ratio %s",time_ratio.get_string().c_str());
synfig::info("Bottom %s",bottom.get_string().c_str());
- synfig::info("Top %s",top.get_string().c_str());
+ synfig::info("Top %s",top.get_string().c_str());*/
if(editable_)
{
synfig::Time prev_t,next_t;
{
set_selected_keyframe(selected_none);
selected_=false;
- synfig::info("Selected keyframe set to none");
+ /*synfig::info("Selected keyframe set to none");
synfig::info("Distance to prev %s", (t-prev_t).get_string().c_str());
- synfig::info("Distance to next %s", (next_t-t).get_string().c_str());
+ synfig::info("Distance to next %s", (next_t-t).get_string().c_str());*/
queue_draw();
return true;
}
else if ((t-prev_t)<(next_t-t))
{
set_selected_keyframe(*(kf_list_->find_prev(t)));
- synfig::info("Selected keyframe set to previous");
+ //synfig::info("Selected keyframe set to previous");
queue_draw();
selected_=true;
return true;
else
{
set_selected_keyframe(*(kf_list_->find_next(t)));
- synfig::info("Selected keyframe set to next");
+ //synfig::info("Selected keyframe set to next");
queue_draw();
selected_=true;
return true;
if(dragging_)
stat=perform_move_kf();
dragging_=false;
- synfig::info("Dropping keyframe time at: %s", t.get_string().c_str());
- synfig::info("perform move result: %i", stat);
+ //synfig::info("Dropping keyframe time at: %s", t.get_string().c_str());
+ //synfig::info("perform move result: %i", stat);
return stat;
}
default:
Widget_Keyframe_List::set_canvas_interface(etl::loose_handle<synfigapp::CanvasInterface> h)
{
canvas_interface_=h;
+ // Store the values used fomr the canvas interface.
if (canvas_interface_)
{
set_fps(canvas_interface_->get_canvas()->rend_desc().get_frame_rate());