gui: fix tree item move command
This commit is contained in:
parent
f72e048295
commit
9e98a55b07
8
gui.py
8
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user