Skip to content

Commit

Permalink
fixed $469
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Aug 16, 2019
1 parent 67af7f6 commit ed5263e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions @xolotl/copy.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

0 comments on commit ed5263e

Please sign in to comment.