From 42278c6429b5058d0f6c3ae08b1ba9050431b930 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 24 Sep 2009 15:03:39 +0300 Subject: [PATCH] CML2 fix for pre-loaded configurations to be written without visibility check. Symbols loaded from old configuration were written back without visibility check. --- tools/cml2-tools/cmlsystem.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/cml2-tools/cmlsystem.py b/tools/cml2-tools/cmlsystem.py index 53f5921..fa4c0b5 100644 --- a/tools/cml2-tools/cmlsystem.py +++ b/tools/cml2-tools/cmlsystem.py @@ -478,7 +478,8 @@ class CMLSystem(cml.CMLRulebase): def saveable(self, node, mode="normal"): "Should this symbol be visible in the configuration written out?" - if node.setcount > 0: + # Fix for loaded symbols from old configuration being written back without visibility check. + if node.setcount > 0 and self.is_visible(node): return 1 if node.is_derived() and (not node.visibility or cml.evaluate(node.visibility)): return 1