diff --git a/src/Mod/PartDesign/FeatureHole/FeatureHole.py b/src/Mod/PartDesign/FeatureHole/FeatureHole.py index 8e452e8e4..b4d6c408f 100644 --- a/src/Mod/PartDesign/FeatureHole/FeatureHole.py +++ b/src/Mod/PartDesign/FeatureHole/FeatureHole.py @@ -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) diff --git a/src/Mod/PartDesign/FeatureHole/HoleGui.py b/src/Mod/PartDesign/FeatureHole/HoleGui.py index 59893d378..f654f9512 100644 --- a/src/Mod/PartDesign/FeatureHole/HoleGui.py +++ b/src/Mod/PartDesign/FeatureHole/HoleGui.py @@ -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") diff --git a/src/Mod/PartDesign/FeatureHole/TaskHole.py b/src/Mod/PartDesign/FeatureHole/TaskHole.py index c02dda182..da1637806 100644 --- a/src/Mod/PartDesign/FeatureHole/TaskHole.py +++ b/src/Mod/PartDesign/FeatureHole/TaskHole.py @@ -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]