From: dooglus Date: Sat, 22 Nov 2008 15:36:51 +0000 (+0000) Subject: Use Layer::simple_clone() rather than Layer::clone() in optimize_canvas() to prevent... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=843ac7146b30c389db9123564d0727b71c64def2;p=synfig.git 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 --- 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()));