Use Layer::simple_clone() rather than Layer::clone() in optimize_canvas() to prevent...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 22 Nov 2008 15:36:51 +0000 (15:36 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sat, 22 Nov 2008 15:36:51 +0000 (15:36 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2243 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp

index c2cf775..60f4be9 100644 (file)
@@ -1236,7 +1236,8 @@ synfig::optimize_layers(Time time, Context context, Canvas::Handle op_canvas, bo
                                !composite->reads_context())
                        {
                                Canvas::Handle sub_canvas(Canvas::create_inline(op_canvas));
-                               sub_canvas->push_back(composite = composite->clone());
+                               // don't use clone() because it re-randomizes the seeds of any random valuenodes
+                               sub_canvas->push_back(composite = composite->simple_clone());
                                layer = Layer::create("PasteCanvas");
                                composite->set_description(strprintf("Wrapped clone of '%s'", composite->get_non_empty_description().c_str()));
                                layer->set_description(strprintf("PasteCanvas wrapper for '%s'", composite->get_non_empty_description().c_str()));