parameters: (self)
docstring: Undoes last line segment.
docstring_summary: Undoes last line segment.
docstring_tokens: Undoes last line segment .
function: def undolast(self):
          """Undoes last line segment."""
          import Part
          if len(self.node) > 1:
              self.node.pop()
              # last = self.node[-1]
              if self.obj.Shape.Edges:
                  edges = self.obj.Shape.Edges
                  if len(edges) > 1:
                      newshape = Part.makePolygon(self.node)
                      self.obj.Shape = newshape
                  else:
                      self.obj.ViewObject.hide()
                  # DNC: report on removal
                  # _msg(translate("draft", "Removing last point"))
                  _msg(translate("draft", "Pick next point"))
function_tokens: def undolast ( self ) : import Part if len ( self . node ) > 1 : self . node . pop ( ) # last = self.node[-1] if self . obj . Shape . Edges : edges = self . obj . Shape . Edges if len ( edges ) > 1 : newshape = Part . makePolygon ( self . node ) self . obj . Shape = newshape else : self . obj . ViewObject . hide ( ) # DNC: report on removal # _msg(translate("draft", "Removing last point")) _msg ( translate ( "draft" , "Pick next point" ) )