From dd8027a83965de8a71a2b2c4dc11709d9e1ad8ac Mon Sep 17 00:00:00 2001 From: DeepSOIC Date: Wed, 16 Dec 2015 20:43:12 +0300 Subject: [PATCH] API: fix document.copyObject not working when with dependencies copyObject failed with an error when attempting to copy an object with dependencies from one document to another. http://forum.freecadweb.org/viewtopic.php?f=22&t=13533&p=108288#p108288 --- src/App/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 606f99db5..69e849f6d 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -2162,7 +2162,7 @@ DocumentObject* Document::copyObject(DocumentObject* obj, bool recursive) MergeDocuments md(this); if (recursive) { - objs = getDependencyList(objs); + objs = obj->getDocument()->getDependencyList(objs); } unsigned int memsize=1000; // ~ for the meta-information