Exemple #1
0
 def Detach(self):
     """
     Detach the shape from its diagram.
     This is the way to delete a shape. All anchor points are also
     removed, and link lines too.
     """
     # do not detach a protected shape
     if self._diagram is not None and not self._protected:
         Shape.Detach(self)
         self.ShowSizers(False)
Exemple #2
0
 def Detach(self):
     """
     Detach the line and all its line points, including src and dst.
     """
     if self._diagram is not None and not self._protected:
         Shape.Detach(self)
         # while loop, because Detach will remove controls from the list on
         # which we iterate
         while self._controls:
             self._controls[0].Detach()
         self._srcAnchor.RemoveLine(self)
         self._dstAnchor.RemoveLine(self)