From 9e98a55b0796b378b1c5e4365792383ee95f4f1b Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Sat, 9 Dec 2017 13:26:00 +0800 Subject: [PATCH] gui: fix tree item move command --- gui.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui.py b/gui.py index 73debef..a058f6a 100644 --- a/gui.py +++ b/gui.py @@ -277,15 +277,17 @@ class AsmCmdUp(AsmCmdBase): logger.debug('move {}:{} -> {}:{}'.format( i,objName(obj),j,objName(children[j]))) parent.Document.openTransaction(cls._menuText) + readonly = 'Immutable' in parent.getPropertyStatus('Group') + if readonly: + parent.setPropertyStatus('Group','-Immutable') parent.Group = {i:children[j],j:obj} + if readonly: + parent.setPropertyStatus('Group','Immutable') parent.Document.commitTransaction() # The tree view may deselect the item because of claimChildren changes, # so we restore the selection here FreeCADGui.Selection.addSelection(topParent,subname) - if AsmCmdManager.AutoRecompute: - parent.Proxy.solve() - @classmethod def onClearSelection(cls): cls._active = False