X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fcellrenderer_timetrack.cpp;h=93f80b1355df923a6a85998f794f3887070b9c54;hb=6f75b18959ccc6d90a2237e2d49c2a1740d2b436;hp=8a3f7391724deb0675cfeab12e53ac7abf0dd862;hpb=837b63e9fb829d66d43f4f169861f8979f76820d;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp index 8a3f739..93f80b1 100644 --- a/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp +++ b/synfig-studio/trunk/src/gtkmm/cellrenderer_timetrack.cpp @@ -158,6 +158,14 @@ bool get_closest_time(const synfig::Node::time_set &tset, const Time &t, const T { Node::time_set::const_iterator i,j,end = tset.end(); + // stop the crash mentioned in bug #1689282 + // doesn't solve the underlying problem though, I don't think + if (tset.size() == 0) + { + synfig::error(__FILE__":%d: tset.size() == 0",__LINE__); + return false; + } + //TODO add in RangeGet so it's not so damn hard to click on points i = tset.upper_bound(t); //where t is the lower bound, t < [first,i) @@ -191,10 +199,10 @@ void CellRenderer_TimeTrack::render_vfunc( const Glib::RefPtr& window, Gtk::Widget& widget, - const Gdk::Rectangle& background_area, + const Gdk::Rectangle& /*background_area*/, const Gdk::Rectangle& area_, - const Gdk::Rectangle& expose_area, - Gtk::CellRendererState flags) + const Gdk::Rectangle& /*expose_area*/, + Gtk::CellRendererState /*flags*/) { if(!window) return; @@ -521,7 +529,7 @@ CellRenderer_TimeTrack::render_vfunc( } synfig::ValueNode_Animated::WaypointList::iterator -CellRenderer_TimeTrack::find_waypoint(const synfig::Time& t,const synfig::Time& scope) +CellRenderer_TimeTrack::find_waypoint(const synfig::Time& /*t*/,const synfig::Time& scope) { synfig::ValueNode_Animated *value_node=dynamic_cast(property_value_desc().get_value().get_value_node().get()); @@ -556,11 +564,11 @@ CellRenderer_TimeTrack::find_waypoint(const synfig::Time& t,const synfig::Time& bool CellRenderer_TimeTrack::activate_vfunc( GdkEvent* event, - Gtk::Widget& widget, + Gtk::Widget& /*widget*/, const Glib::ustring& treepath, - const Gdk::Rectangle& background_area, + const Gdk::Rectangle& /*background_area*/, const Gdk::Rectangle& cell_area, - Gtk::CellRendererState flags) + Gtk::CellRendererState /*flags*/) { path=treepath; synfig::ValueNode_Animated::WaypointList::iterator iter; @@ -912,6 +920,15 @@ CellRenderer_TimeTrack::show_timepoint_menu(const etl::handle& nod Gtk::Menu* interp_menu(manage(new Gtk::Menu())); Waypoint::Model model; + // note: each of the following 4 'if' blocks provokes these warnings: + // /usr/include/sigc++-2.0/sigc++/adaptors/bound_argument.h:57: warning: + // 'model.synfig::Waypoint::Model::temporal_tension' is used uninitialized in this function + // 'model.synfig::Waypoint::Model::bias' is used uninitialized in this function + // 'model.synfig::Waypoint::Model::continuity' is used uninitialized in this function + // 'model.synfig::Waypoint::Model::tension' is used uninitialized in this function + // 'model.synfig::Waypoint::Model::priority' is used uninitialized in this function + // I don't know if that matters or not. + if(side==SIDE_LEFT)model.set_before(INTERPOLATION_TCB); else model.set_after(INTERPOLATION_TCB); interp_menu->items().push_back(Gtk::Menu_Helpers::MenuElem(_("TCB"),