From ed5263e3e0737d592fb3144cfcea606499bcb340 Mon Sep 17 00:00:00 2001 From: Srinivas Gorur-Shandilya Date: Fri, 16 Aug 2019 19:01:18 -0400 Subject: [PATCH] fixed $469 --- @xolotl/copy.m | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/@xolotl/copy.m b/@xolotl/copy.m index 5703aa59..26f493eb 100644 --- a/@xolotl/copy.m +++ b/@xolotl/copy.m @@ -35,6 +35,15 @@ % make a new cpplab object N = xolotl; +C = self.Children; +N.Children = {}; + +% copy cpplab properties by recursively calling copy +for i = 1:length(C) + NN = self.(C{i}).copy; + N.add(NN,C{i}); +end + % copy over every non-cpplab property props = properties(self); for i = 1:length(props) @@ -47,15 +56,6 @@ end end -C = self.Children; -N.Children = {}; - -% copy cpplab properties by recursively calling copy - -for i = 1:length(C) - NN = self.(C{i}).copy; - N.add(NN,C{i}); -end % synchronize states N.deserialize(self.serialize)