MCPcopy Create free account
hub / github.com/SLiCAP/SLiCAP_python / _cancel_draw

Method _cancel_draw

SLiCAP/schematic/canvas.py:824–834  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

822 self.placing_started.emit() # reuse signal: switches view to NoDrag
823
824 def _cancel_draw(self) -> None:
825 if self._draw_ghost is not None and self._draw_ghost.scene():
826 self.removeItem(self._draw_ghost)
827 self._draw_ghost = None
828 self._draw_anchor = None
829 self._draw_pts = []
830 self._draw_kind = None
831 if self._mode in (_Mode.DRAWING_LINE, _Mode.DRAWING_RECT,
832 _Mode.DRAWING_CIRCLE):
833 self._mode = _Mode.NORMAL
834 self.placing_cancelled.emit()
835
836 def _update_draw_ghost(self, scene_pos: QPointF) -> None:
837 from .shape_item import ShapeItem

Callers 3

start_drawingMethod · 0.95
_commit_shapeMethod · 0.95
keyPressEventMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected