From 2f54b9122423f08cf8435c237c8a629fe92fcece Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Tue, 4 Dec 2018 11:07:08 +0800 Subject: [PATCH] mover: fix moving part of external linked assembly Fixes #149 --- mover.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mover.py b/mover.py index ca1c4f7..d5fcd8e 100644 --- a/mover.py +++ b/mover.py @@ -295,12 +295,15 @@ def movePart(useCenterballDragger=None,moveInfo=None): if doc: doc.resetEdit() vobj = resolveAssembly(info.Parent).Object.ViewObject - doc = info.Parent.ViewObject.Document + vobj.Proxy._movingPart = AsmMovingPart(moveInfo.Hierarchy,info) if useCenterballDragger is not None: vobj.UseCenterballDragger = useCenterballDragger - vobj.Proxy._movingPart = AsmMovingPart(moveInfo.Hierarchy,info) FreeCADGui.Selection.clearSelection() - return doc.setEdit(vobj,1) + + subname = moveInfo.SelSubname[:-len(info.SubnameRef)] + topVObj = moveInfo.SelObj.ViewObject + mode = 1 if info.Parent==vobj.Object else 0x8001 + return topVObj.Document.setEdit(topVObj,mode,subname) class AsmQuickMover: def __init__(self, info):