Skip to content

Commit

Permalink
only write manually set name
Browse files Browse the repository at this point in the history
  • Loading branch information
schriftgestalt committed Jul 31, 2023
1 parent fa926c8 commit f0f13d5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Lib/glyphsLib/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4125,7 +4125,7 @@ def _serialize_to_plist(self, writer):

userData = dict(self.userData)

if self.layerId != self.associatedMasterId:
if not self.isMasterLayer:
writer.writeObjectKeyValue(self, "associatedMasterId")
if writer.formatVersion > 2:
attributes = self._get_plist_attributes()
Expand All @@ -4152,9 +4152,9 @@ def _serialize_to_plist(self, writer):
writer.writeObjectKeyValue(self, "metricRight")
writer.writeObjectKeyValue(self, "metricWidth")
if (
self.name is not None
and len(self.name) > 0
and self.layerId != self.associatedMasterId
self._name is not None
and len(self._name) > 0
and not self.isMasterLayer
):
writer.writeObjectKeyValue(self, "name")
if writer.formatVersion > 2:
Expand Down Expand Up @@ -4482,6 +4482,9 @@ def leftMetricsKey(self, value):
def widthMetricsKey(self, value):
self.metricWidth = value

def isMasterLayer(self):
return self.layerId == self.associatedMasterId

def isBracketLayer(self):
return LAYER_ATTRIBUTE_AXIS_RULES in self.attributes

Expand Down

0 comments on commit f0f13d5

Please sign in to comment.