Fixed deletion of dressup - clearing child object pointer prevents Tree from moving it to the root of the tree.
This commit is contained in:
committed by
Yorik van Havre
parent
7773d30c0d
commit
7d44c26b38
@@ -95,6 +95,7 @@ class ViewProviderDressup:
|
||||
'''this makes sure that the base operation is added back to the project and visible'''
|
||||
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
|
||||
P.addToProject(arg1.Object.Base)
|
||||
arg1.Object.Base = None
|
||||
return True
|
||||
|
||||
class CommandPathDressup:
|
||||
|
||||
@@ -975,6 +975,7 @@ class ViewProviderDressup:
|
||||
'''this makes sure that the base operation is added back to the project and visible'''
|
||||
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
|
||||
PathUtils.addToJob(arg1.Object.Base)
|
||||
arg1.Object.Base = None
|
||||
return True
|
||||
|
||||
class CommandDressupDogbone:
|
||||
|
||||
@@ -30,7 +30,7 @@ import Path
|
||||
from PySide import QtCore, QtGui
|
||||
import math
|
||||
import DraftVecUtils as D
|
||||
import PathScripts.PathUtils as P
|
||||
import PathScripts.PathUtils as PathUtils
|
||||
|
||||
"""Dragknife Dressup object and FreeCAD command"""
|
||||
|
||||
@@ -458,7 +458,8 @@ class ViewProviderDressup:
|
||||
|
||||
def onDelete(self, arg1=None, arg2=None):
|
||||
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
|
||||
P.addToProject(arg1.Object.Base)
|
||||
PathUtils.addToProject(arg1.Object.Base)
|
||||
arg1.Object.Base = None
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -1465,6 +1465,7 @@ class ViewProviderDressup:
|
||||
if obj:
|
||||
obj.Visibility = True
|
||||
PathUtils.addToJob(arg1.Object.Base)
|
||||
arg1.Object.Base = None
|
||||
return True
|
||||
|
||||
def updateData(self, obj, propName):
|
||||
|
||||
@@ -564,6 +564,7 @@ class ViewProviderDressup:
|
||||
'''this makes sure that the base operation is added back to the project and visible'''
|
||||
FreeCADGui.ActiveDocument.getObject(arg1.Object.Base.Name).Visibility = True
|
||||
PathUtils.addToJob(arg1.Object.Base)
|
||||
arg1.Object.Base = None
|
||||
return True
|
||||
|
||||
def __getstate__(self):
|
||||
|
||||
Reference in New Issue
Block a user