From 843ac7146b30c389db9123564d0727b71c64def2 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sat, 22 Nov 2008 15:36:51 +0000 Subject: [PATCH] Use Layer::simple_clone() rather than Layer::clone() in optimize_canvas() to prevent random valuenodes having their seed re-randomized when the layer structure is optimized. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2243 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/canvas.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/canvas.cpp b/synfig-core/trunk/src/synfig/canvas.cpp index c2cf775..60f4be9 100644 --- a/synfig-core/trunk/src/synfig/canvas.cpp +++ b/synfig-core/trunk/src/synfig/canvas.cpp @@ -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())); -- 2.7.4