Skip to content

Commit

Permalink
Merge pull request #239 from robotools/fontGuidelineWillBeAdded
Browse files Browse the repository at this point in the history
add missing notification: Font.GuidelineWillBeAdded
  • Loading branch information
benkiel committed Jun 18, 2019
2 parents f99b453 + 11fe241 commit a1e9d28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/defcon/objects/font.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Font(BaseObject):
- Font.GlyphOrderChanged
- Font.GuidelinesChanged
- Font.GuidelineWillBeDeleted
- Font.GuidelineWillBeAdded
The Font object has some dict like behavior. For example, to get a glyph::
Expand Down Expand Up @@ -1064,6 +1065,7 @@ def insertGuideline(self, index, guideline):
if not isinstance(guideline, self._guidelineClass):
guideline = self.instantiateGuideline(guidelineDict=guideline)
assert guideline.font in (self, None), "This guideline belongs to another font."
self.postNotification(notification="Font.GuidelineWillBeAdded")
if guideline.font is None:
assert guideline.glyph is None, "This guideline belongs to a glyph."
if guideline.font is None:
Expand Down

0 comments on commit a1e9d28

Please sign in to comment.