Module: synfig
Branch: zelgadis_master
Commit: a109a797a2a1dbae8457cb65c905e44f4847b0ad
URL:
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=a109a797a2a1dbae8457cb65c905e44f4847b0ad
Author: Carlos Lopez <car...@pcnuevo.(none)>
Date: Thu Jul 16 15:13:22 2009 +0200
Better solution to find a valid canvas for the displayed valuenodes
---
synfig-studio/trunk/src/gtkmm/widget_curves.cpp | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
index cf44f76..6077772 100644
--- a/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
+++ b/synfig-studio/trunk/src/gtkmm/widget_curves.cpp
@@ -504,12 +504,19 @@ Widget_Curves::redraw(GdkEventExpose */*bleh*/)
gc->set_rgb_fg_color(Gdk::Color("#0000ff")); // It should be user
selectable
get_window()->draw_rectangle(gc, false,
round_to_int((time_adjustment_->get_value()-t_begin)/dt), 0, 0, h);
- // 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;
+ }
+
if(canvas)
{
+ // Draw vertical lines for the keyframes marks.
const synfig::KeyframeList&
keyframe_list(canvas->keyframe_list());
synfig::KeyframeList::const_iterator iter;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl