From 0a5b37d7d24a5fdb150d82198db8b1fc03098af1 Mon Sep 17 00:00:00 2001 From: schriftgestalt Date: Tue, 24 Oct 2023 23:11:26 +0200 Subject: [PATCH] Performance --- Lib/glyphsLib/builder/glyph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/glyphsLib/builder/glyph.py b/Lib/glyphsLib/builder/glyph.py index 57f7dff92..c8f5b129c 100644 --- a/Lib/glyphsLib/builder/glyph.py +++ b/Lib/glyphsLib/builder/glyph.py @@ -257,12 +257,12 @@ def to_ufo_glyph_color(self, ufo_glyph, layer, glyph, do_color_layers=True): # add them as separate glyphs to the UFO font. if any( - l.isColorPaletteLayer and l.associatedMasterId == layer.associatedMasterId - for l in glyph.layers + l.associatedMasterId == masterId and l.isColorPaletteLayer + for layerId, l in glyph._layers.items() ): layerMapping = [ (l.layerId, l._color_palette_index()) - for l in glyph.layers + for layerId, l in glyph._layers.items() if l.isColorPaletteLayer and l.associatedMasterId == layer.associatedMasterId ]