Skip to content

Commit

Permalink
Fix spurious "None" on cancel BSpline/BezCurve
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan authored and yorikvanhavre committed Feb 26, 2014
1 parent 63f930c commit 50883c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Mod/Draft/DraftTools.py
Expand Up @@ -649,9 +649,11 @@ def finish(self,closed=False,cont=False):
self.bsplinetrack.finalize()
if not Draft.getParam("UiMode",1):
FreeCADGui.Control.closeDialog()
if (len(self.node) > 1):
if self.obj:
# remove temporary object, if any
old = self.obj.Name
todo.delay(self.doc.removeObject,old)
if (len(self.node) > 1):
try:
# building command string
rot,sup,pts,fil = self.getStrings()
Expand Down Expand Up @@ -749,9 +751,11 @@ def finish(self,closed=False,cont=False):
self.bezcurvetrack.finalize()
if not Draft.getParam("UiMode",1):
FreeCADGui.Control.closeDialog()
if (len(self.node) > 1):
if self.obj:
# remove temporary object, if any
old = self.obj.Name
todo.delay(self.doc.removeObject,old)
if (len(self.node) > 1):
try:
# building command string
rot,sup,pts,fil = self.getStrings()
Expand Down

0 comments on commit 50883c4

Please sign in to comment.