def _createComponent(self, *args): widget = self.parent() newGlyph, ok = AddComponentDialog.getNewGlyph(widget, self._glyph) if ok and newGlyph is not None: component = TComponent() component.baseGlyph = newGlyph.name self._glyph.appendComponent(component)
def _createComponent(self, *_): widget = self.parent() glyph = self._glyph newGlyph, ok = AddComponentDialog.getNewGlyph(widget, glyph) if ok and newGlyph is not None: component = glyph.instantiateComponent() component.baseGlyph = newGlyph.name glyph.appendComponent(component)
def _createComponent(self, *args): widget = self.parent() glyph = self._glyph glyph.prepareUndo() newGlyph, ok = AddComponentDialog.getNewGlyph(widget, glyph) if ok and newGlyph is not None: component = glyph.instantiateComponent() component.baseGlyph = newGlyph.name glyph.appendComponent(component)