X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fwidget_keyframe_list.cpp;h=ace2b98b4a925dc14c1afea5045587524998fa39;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=a350aa1b5ae3e2423bed4a535e3eee81c18efad5;hpb=47baca24f2eaa508d5f39a524fed0e910a0e45c9;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp b/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp index a350aa1..ace2b98 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_keyframe_list.cpp @@ -193,8 +193,12 @@ Widget_Keyframe_List::perform_move_kf(bool delta=false) kf_list_->find_prev_next(selected_kf_time, prev, next); // Not possible to set delta to the first keyframe // perform normal movement - if (prev==Time::begin()) delta = false; - + // As suggested by Zelgadis it is better to not perform anything. + if (prev==Time::begin() && delta==true) + { + synfig::info(_("Not possible to ALT-drag the first keyframe")); + return false; + } if(!delta) { synfigapp::Action::Handle action(synfigapp::Action::create("KeyframeSet")); @@ -282,6 +286,7 @@ Widget_Keyframe_List::on_event(GdkEvent *event) // AND NOT left or right mouse button pressed else { + Glib::ustring ttip=""; synfig::Time p_t,n_t; kf_list_->find_prev_next(t, p_t, n_t); if( (p_t==Time::begin() && n_t==Time::end()) @@ -289,23 +294,21 @@ Widget_Keyframe_List::on_event(GdkEvent *event) ((t-p_t)>time_ratio && (n_t-t)>time_ratio) ) { - Glib::ustring ttip = _("Click and drag keyframes"); - set_tooltip_text(ttip); + ttip = _("Click and drag keyframes"); } else if ((t-p_t)<(n_t-t)) { synfig::Keyframe kf(*kf_list_->find_prev(t)); synfig::String kf_name(kf.get_description().c_str()); - Glib::ustring ttip = kf_name.c_str(); - set_tooltip_text(ttip); + ttip = kf_name.c_str(); } else { synfig::Keyframe kf(*kf_list_->find_next(t)); synfig::String kf_name(kf.get_description().c_str()); - Glib::ustring ttip = kf_name.c_str(); - set_tooltip_text(ttip); + ttip = kf_name.c_str(); } + tooltips.set_tip(*this, ttip); dragging_=false; queue_draw(); return true;