- // This is not the best solution but I guess that if the first valuenode
- // has canvas then show the keyframes. Maybe I can loop all them until I find
- // a valid canvas and use it for look to the keyframes.
- synfig::Canvas::Handle canvas(curve_list_.begin()->value_desc.get_canvas());
+ // This try to find a valid vanvas to show the keyframes of those
+ // valuenodes. If not canvas found then no keyframes marks are shown.
+ synfig::Canvas::Handle canvas=0;
+ for(curve_iter=curve_list_.begin();curve_iter!=curve_list_.end();++curve_iter)
+ {
+ canvas=curve_iter->value_desc.get_canvas();
+ if(canvas)
+ break;
+ }
+