Don't set_time() twice for the current canvas.
[synfig.git] / synfig-studio / trunk / src / synfigapp / canvasinterface.cpp
index ba49e88..1d8a820 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -106,9 +107,10 @@ CanvasInterface::set_time(synfig::Time x)
        get_canvas()->set_time(cur_time_=x);
 
        // update the time in all the child canvases
-       Canvas::Children children = get_canvas()->children();
+       Canvas::Children children = get_canvas()->get_root()->children();
+       handle<CanvasInterface> interface;
        for (Canvas::Children::iterator iter = children.begin(); iter != children.end(); iter++)
-               if (handle<CanvasInterface> interface = get_instance()->find_canvas_interface(*iter))
+               if ((interface = get_instance()->find_canvas_interface(*iter)) != this)
                        interface->set_time(interface->get_canvas()->get_time());
 
        signal_time_changed()();