gui: fix assembly solve command
Fix selection detection, and undo/redo setup
This commit is contained in:
parent
882faf9d53
commit
fb9ad1609d
|
@ -1463,9 +1463,9 @@ class Assembly(AsmGroup):
|
||||||
objs.add(sel.Object)
|
objs.add(sel.Object)
|
||||||
continue
|
continue
|
||||||
for subname in sel.SubElementNames:
|
for subname in sel.SubElementNames:
|
||||||
ret = Assembly.find(sel.Object,subname,recursive=True)
|
ret = Assembly.find(sel.Object,subname,keepEmptyChild=True)
|
||||||
if ret:
|
if ret:
|
||||||
objs.add(ret[-1].Assembly)
|
objs.add(ret.Assembly)
|
||||||
return tuple(objs)
|
return tuple(objs)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
2
gui.py
2
gui.py
|
@ -138,8 +138,10 @@ class AsmCmdSolve(AsmCmdBase):
|
||||||
@classmethod
|
@classmethod
|
||||||
def Activated(cls):
|
def Activated(cls):
|
||||||
from . import solver
|
from . import solver
|
||||||
|
FreeCAD.setActiveTransaction('Assembly solve')
|
||||||
logger.report('command "{}" exception'.format(cls.getName()),
|
logger.report('command "{}" exception'.format(cls.getName()),
|
||||||
solver.solve)
|
solver.solve)
|
||||||
|
FreeCAD.closeActiveTransaction()
|
||||||
|
|
||||||
|
|
||||||
class AsmCmdMove(AsmCmdBase):
|
class AsmCmdMove(AsmCmdBase):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user