diff options
author | ritsuka <[email protected]> | 2015-05-17 06:30:22 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-05-17 06:30:22 +0000 |
commit | 2d986b4354a0497a829b4bd5bb95c54ffde7970d (patch) | |
tree | 5860c2081a3656709f51838f2ae74fb7c6e30efe /macosx/HBTreeNode.m | |
parent | 11f037ee4d90018928186ae8fb0b1b4f9429d49a (diff) |
MacGui: make a copy of a preset before showing the export window.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7202 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBTreeNode.m')
-rw-r--r-- | macosx/HBTreeNode.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/macosx/HBTreeNode.m b/macosx/HBTreeNode.m index 786e9500b..e02d3e70f 100644 --- a/macosx/HBTreeNode.m +++ b/macosx/HBTreeNode.m @@ -18,6 +18,20 @@ return self; } +- (id)copyWithZone:(NSZone *)zone +{ + HBTreeNode *node = [[self class] allocWithZone:zone]; + node->_children = [[NSMutableArray alloc] init]; + node->_isLeaf = self.isLeaf; + + for (HBTreeNode *children in self.children) + { + [node.children addObject:[children copy]]; + } + + return node; +} + - (NSUInteger)countOfChildren { return self.children.count; |