Skip to content

Commit

Permalink
PATH: Prevent Job creation without Base object.
Browse files Browse the repository at this point in the history
PathMillFace won't add a base if it isn't known to the parent
  • Loading branch information
sliptonic committed Dec 11, 2016
1 parent bafbd27 commit 4c66748
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Mod/Path/PathScripts/PathJob.py
Expand Up @@ -243,6 +243,9 @@ def __init__(self, obj, deleteOnReject):
self.postProcessorArgsDefaultTooltip = self.form.cboPostProcessorArgs.toolTip()

def accept(self):
if self.obj.Base is None:
QtGui.QMessageBox.information(None,"","No Base Object Selected.")
return
self.getFields()
FreeCADGui.ActiveDocument.resetEdit()
FreeCADGui.Control.closeDialog()
Expand Down
5 changes: 5 additions & 0 deletions src/Mod/Path/PathScripts/PathMillFace.py
Expand Up @@ -27,6 +27,7 @@
from PySide import QtCore, QtGui
from PathScripts import PathUtils
import Part
import PathScripts.PathUtils
import PathScripts.PathKurveUtils
import area
import TechDraw
Expand Down Expand Up @@ -135,6 +136,10 @@ def _guessDepths(self, obj, ss, sub=""):


def addFacebase(self, obj, ss, sub=""):
parent = PathScripts.PathUtils.findParentJob(obj)
if parent.Base is None:
return

baselist = obj.Base
if baselist is None:
baselist = []
Expand Down

0 comments on commit 4c66748

Please sign in to comment.