Fixed operation update when TC changes - allow TC edit abortion.
This commit is contained in:
@@ -221,6 +221,20 @@ class ObjectJob:
|
||||
group.append(tc)
|
||||
self.obj.ToolController = group
|
||||
|
||||
def allOperations(self):
|
||||
ops = []
|
||||
def collectBaseOps(op):
|
||||
if op.TypeId == 'Path::FeaturePython':
|
||||
ops.append(op)
|
||||
if hasattr(op, 'Base'):
|
||||
collectBaseOps(op.Base)
|
||||
if op.TypeId == 'Path::FeatureCompoundPython':
|
||||
ops.append(op)
|
||||
for sub in op.Group:
|
||||
collectBaseOps(sub)
|
||||
for op in self.obj.Operations.Group:
|
||||
collectBaseOps(op)
|
||||
return ops
|
||||
|
||||
@classmethod
|
||||
def baseCandidates(cls):
|
||||
|
||||
@@ -45,7 +45,7 @@ from pivy import coin
|
||||
def translate(context, text, disambig=None):
|
||||
return QtCore.QCoreApplication.translate(context, text, disambig)
|
||||
|
||||
if True:
|
||||
if False:
|
||||
PathLog.setLevel(PathLog.Level.DEBUG, PathLog.thisModule())
|
||||
PathLog.trackModule(PathLog.thisModule())
|
||||
else:
|
||||
|
||||
@@ -136,18 +136,6 @@ class ToolController:
|
||||
if obj.ViewObject:
|
||||
obj.ViewObject.Visibility = True
|
||||
|
||||
def onChanged(self, obj, prop):
|
||||
PathLog.track('prop: {} state: {}'.format(prop, obj.State))
|
||||
|
||||
if 'Path' == prop and 'Restore' not in obj.State:
|
||||
PathLog.warning('Markus you gotta do something about TC changes')
|
||||
# PathLog.debug("--- dirty deeds")
|
||||
# job = PathScripts.PathUtils.findParentJob(obj)
|
||||
# if job is not None:
|
||||
# for g in job.Group:
|
||||
# if not(isinstance(g.Proxy, PathScripts.PathToolController.ToolController)):
|
||||
# g.touch()
|
||||
|
||||
def getTool(self, obj):
|
||||
'''returns the tool associated with this tool controller'''
|
||||
PathLog.track()
|
||||
@@ -396,9 +384,6 @@ class TaskPanel:
|
||||
t = Part.makeCylinder(radius, length)
|
||||
self.toolrep.Shape = t
|
||||
|
||||
def getStandardButtons(self):
|
||||
return int(QtGui.QDialogButtonBox.Ok)
|
||||
|
||||
def edit(self, item, column):
|
||||
if not self.updating:
|
||||
self.resetObject()
|
||||
|
||||
Reference in New Issue
Block a user