def _createAnchor(self, *args): widget = self.parent() pos = widget.mapToCanvas(widget.mapFromGlobal(self._cachedPos)) newAnchorName, ok = AddAnchorDialog.getNewAnchorName(widget, pos) if ok: anchor = TAnchor() anchor.x = pos.x() anchor.y = pos.y() anchor.name = newAnchorName self._glyph.appendAnchor(anchor)
def _renameAnchor(self, anchor): widget = self.parent() newAnchorName, ok = AddAnchorDialog.getNewAnchorName( widget, None, anchor.name) if ok: anchor.name = newAnchorName