From 8e1b6d97deadece2bce8495eafcbdab9781e1c70 Mon Sep 17 00:00:00 2001 From: Suchita Lad Date: Tue, 20 May 2025 16:10:13 +0530 Subject: Added format_real_number in CLSS block --- blocks/Xcos/blocks/CLSS.py | 3 +-- blocks/Xcos/common/AAAAAA.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/Xcos/blocks/CLSS.py b/blocks/Xcos/blocks/CLSS.py index acc89653..abc6912b 100644 --- a/blocks/Xcos/blocks/CLSS.py +++ b/blocks/Xcos/blocks/CLSS.py @@ -6,8 +6,7 @@ def CLSS(outroot, attribid, ordering, geometry, parameters, parent=1, style=None if style is None: style = func_name - para4 = int(float(parameters[3])) - + para4 = format_real_number(parameters[3]) if para4 == 0: depends_u = '0' else: diff --git a/blocks/Xcos/common/AAAAAA.py b/blocks/Xcos/common/AAAAAA.py index ef425612..5048cb55 100644 --- a/blocks/Xcos/common/AAAAAA.py +++ b/blocks/Xcos/common/AAAAAA.py @@ -1703,7 +1703,8 @@ def process_xcos_model(diagram, title, rootattribid, parentattribid, attribid = attrib['id'] nextattribid = getNextAttribId(attribid, nextattribid) - cell_type = attrib['CellType'] + # cell_type = attrib['CellType'] + cell_type = attrib.get('CellType') mxGeometry = cell.find('mxGeometry') if cell_type == 'Component': -- cgit