From 702d13386104d86aa67337964214eb4f47fa8213 Mon Sep 17 00:00:00 2001 From: Erik van Blokland Date: Thu, 21 Feb 2008 07:46:17 +0000 Subject: [PATCH] A fix for ticket http://code.robofab.com/ticket/2 When the feature order is present, it does not mean the features are still in tact, they might have been edited by an earlier version of robofab. Now it checks if a feature is present before adding it to the list of things to add. git-svn-id: http://svn.robofab.com/trunk@32 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c --- robofab/Lib/robofab/objects/objectsFL.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robofab/Lib/robofab/objects/objectsFL.py b/robofab/Lib/robofab/objects/objectsFL.py index 0d9b85720..164140fe8 100755 --- a/robofab/Lib/robofab/objects/objectsFL.py +++ b/robofab/Lib/robofab/objects/objectsFL.py @@ -885,7 +885,9 @@ class RFont(BaseFont): #features = features.items() orderedFeatures = [] for tag in order: - orderedFeatures.append((tag, features[tag])) + oneFeature = features.get(tag) + if oneFeature is not None: + orderedFeatures.append((tag, oneFeature)) self.naked().features.clean() for tag, src in orderedFeatures: self.naked().features.append(Feature(tag, src))