CML2 fix for pre-loaded configurations to be written without visibility check.

Symbols loaded from old configuration were written back without visibility check.
This commit is contained in:
Bahadir Balban
2009-09-24 15:03:39 +03:00
parent a5a75270c0
commit 42278c6429

View File

@@ -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