make hole feature work again

This commit is contained in:
Stefan Tröger 2015-06-05 16:08:39 +02:00
parent 7f80e711f6
commit 08e4151ea1
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class Hole():
self.feature.addProperty("App::PropertyLinkSub","Support","Hole","Support of hole feature").Support=None
self.feature.addProperty("App::PropertyLink","HoleGroove","Hole","Revolution feature creating the hole").HoleGroove=None
# Create new HoleGroove feature
body = PartDesignGui.getActivePart()
body = FreeCADGui.activeView().getActiveObject("pdbody");
self.sketchaxis = self.feature.Document.addObject("PartDesign::Line", "HoleSketchAxis")
body.addFeature(self.sketchaxis)
self.Gui.ActiveDocument.hide(self.sketchaxis.Name)

View File

@ -61,7 +61,7 @@ class HoleGui:
# It is done in TaskHole.updateUI() instead
# Show feature preview
body = PartDesignGui.getActivePart()
body = FreeCADGui.activeView().getActiveObject("pdbody");
if body == None:
QtGui.QMessageBox.critical(mw, "No active body", "Please create a body or make a body active")

View File

@ -49,7 +49,7 @@ class TaskHole:
if (self.feature != None):
self.hideFeature() # Show the support again
document = self.feature.Document
body = PartDesignGui.getActivePart()
body = FreeCADGui.activeView().getActiveObject("pdbody");
groove = self.feature.HoleGroove
sketch = groove.Sketch
plane = sketch.Support[0]