Skip to content

Commit

Permalink
Fixed deletion of dressup - clearing child object pointer prevents Tr…
Browse files Browse the repository at this point in the history
…ee from moving it to the root of the tree.
  • Loading branch information
mlampert authored and yorikvanhavre committed Jun 26, 2017
1 parent 7773d30 commit 7d44c26
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Mod/Path/PathScripts/PathDressup.py
Expand Up @@ -95,6 +95,7 @@ def onDelete(self, arg1=None, arg2=None):
'''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:
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Path/PathScripts/PathDressupDogbone.py
Expand Up @@ -975,6 +975,7 @@ def onDelete(self, arg1=None, arg2=None):
'''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:
Expand Down
5 changes: 3 additions & 2 deletions src/Mod/Path/PathScripts/PathDressupDragknife.py
Expand Up @@ -30,7 +30,7 @@
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"""

Expand Down Expand Up @@ -458,7 +458,8 @@ def __setstate__(self, state):

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


Expand Down
1 change: 1 addition & 0 deletions src/Mod/Path/PathScripts/PathDressupHoldingTags.py
Expand Up @@ -1465,6 +1465,7 @@ def onDelete(self, arg1=None, arg2=None):
if obj:
obj.Visibility = True
PathUtils.addToJob(arg1.Object.Base)
arg1.Object.Base = None
return True

def updateData(self, obj, propName):
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Path/PathScripts/PathDressupRampEntry.py
Expand Up @@ -564,6 +564,7 @@ def onDelete(self, arg1=None, arg2=None):
'''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):
Expand Down

0 comments on commit 7d44c26

Please sign in to comment.